Make your own product tab

Modules, Add-ons and custom code that's more than just a quick hack or Mod.
Post Reply
Painstik
Posts: 122
Joined: Sun Jul 19, 2009 1:19 pm
Location: Croatia

Make your own product tab

Post 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... :)
Need custom coding for Interspire Shopping Cart? Contact me
Tony Barnes
Posts: 744
Joined: Thu Jun 18, 2009 8:59 am

Re: Make your own product tab

Post 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.
Painstik
Posts: 122
Joined: Sun Jul 19, 2009 1:19 pm
Location: Croatia

Re: Make your own product tab

Post 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.
Need custom coding for Interspire Shopping Cart? Contact me
Post Reply