Post by kabatza1 » Sat Jun 23, 2012 9:40 am

I'm sure we all find useful the "Store Front" on the top right of the admin CP.

However I think it would me much more useful if this link was not so "generic".

What about something similar to the customer account take over, but for Products :ponder:

I have done a very quick vqmod for the product.tpl and it works on the default store very well and saves me a lot of time!

here it is:

Code: Select all

<modification>
	
    <file name="admin/view/template/catalog/product_form.tpl">
    <operation>
      <search position="before"><![CDATA[<div class="buttons">]]></search>
      <add><![CDATA[
	  <!-- View in main store link -->
	  <?php $store = HTTP_CATALOG;?>
     <a onClick="window.open('<?php echo $store . 'index.php?route=product/product&product_id=' . $_GET['product_id']; ?>');">View in <?php echo basename($store); ?></a>
	 <!-- View in main store link -->
		   ]]></add>
    </operation>
  </file>
</modification>
However it will not work on multi-store environment (it will still work on the default store only).
The reason is I could not figure out a quick way to get the store id(s) per product, because there is no product_form.php in admin/controller to vqmod.

I'm sure somebody can do a better job.....

anyway I combine this with with another vqmod
http://www.opencart.com/index.php?route ... on_id=5542

It literary takes me half the time to edit the products.

Can we make these default in future versions please ?

Newbie

Posts

Joined
Wed Jun 13, 2012 1:08 am

Post by oputz » Mon Sep 30, 2013 5:18 pm

Thx for the code, works in 1.5.5.1.
'search position' should be after and the link should have a class="button", so it looks like the other buttons. ;o)

New member

Posts

Joined
Sat Aug 03, 2013 5:43 pm
Who is online

Users browsing this forum: No registered users and 7 guests