Page 1 of 1

Make your own product tab

Posted: Tue Sep 15, 2009 1:55 pm
by Painstik
Ok, let's say you want to add a new tab "Buy Instructions" with instructions how to use your web shop if someone doesn't know how...


Open: templates/[your_template_name]/Panels/ProductsTabs.html

Find:

Code: Select all

lang.OtherProducts = '%%LNG_OtherProducts%%';
Add after:

Code: Select all

lang.BuyInstructions = '%%LNG_BuyInstructions%%';

Open: javascript/product.js

Find:

Code: Select all

TabNames['ProductVendorsOtherProducts'] = lang.OtherProducts;
Add after:

Code: Select all

TabNames['ProductBuyInstructions'] = lang.BuyInstructions;

Open: language/en/front_language.ini

Add:

Code: Select all

BuyInstructions = "Buy Instructions"

Make new: templates/[your_template_name]/Panels/ProductBuyInstructions.html

Code: Select all

<div class="Block Moveable Panel ProductBuyInstructions" id="ProductBuyInstructions" style="display: %%GLOBAL_HideCustomFields%%">
	<h3>%%LNG_BuyInstructions%%</h3>
	<dl class="ProductDetailsGrid">
		Here u write the content of page!
	</dl>
	<hr   style="%%GLOBAL_HideSectionSeparator%%" class="Clear" />
</div>

Open: templates/[your_template_name]/product.html

Find:

Code: Select all

%%Panel.ProductReviews%%
Add after:

Code: Select all

%%Panel.ProductBuyInstructions%%

And that is it... :)

Re: Make your own product tab

Posted: Tue Sep 15, 2009 5:43 pm
by Tony Barnes
Would be great if you could add this to the database so that it would reference actual product details. Far more involved hack though...

The tabs seem a bit silly to me in that they are so lacking in customisation.

Re: Make your own product tab

Posted: Fri Sep 18, 2009 12:24 am
by Painstik
Yeah, it would be nice, but for me this is enough, because BuyInstructions is static page which doesn't need often changes.

Product tabs are not included in database by default, and to make that you have to do a lot of work...
If someone have good will and enough time, they can make addon for this, I am sure lots of people would like to manage their built-in tabs (to show or to hide) and a posibilty to make new (static - for all products or product related) tabs.