KamranMK Posted March 15, 2013 Share Posted March 15, 2013 Hi, I am trying to find out how can I add one text to all products within a specific category or all categories at the same time? does it have anything to do with the product.tpl file? or is there any module for that? Your answers are much appreciated Link to comment Share on other sites More sharing options...
NemoPS Posted March 15, 2013 Share Posted March 15, 2013 If your txt is th same for all products, go to line495 of product.tpl, you'll find this: <ul id="more_info_tabs" class="idTabs idTabsShort clearfix"> {if $product->description}<li><a id="more_info_tab_more_info" href="#idTab1">{l s='More info'}</a></li>{/if} {if $features}<li><a id="more_info_tab_data_sheet" href="#idTab2">{l s='Data sheet'}</a></li>{/if} {if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if} {if isset($accessories) AND $accessories}<li><a href="#idTab4">{l s='Accessories'}</a></li>{/if} {if isset($product) && $product->customizable}<li><a href="#idTab10">{l s='Product customization'}</a></li>{/if} {$HOOK_PRODUCT_TAB} </ul> Add another <li> after hook_product_tab, but inside the ul. Make sure the ahref send you to the same ID you will use for the tab (like #idTab22) Then, at line (well, it was before, will be 1 line after if you added the li into a new line) 642, you'll find: {if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}{$HOOK_PRODUCT_TAB_CONTENT}{/if} After it, add something like <div id="idTab22" class="rte"> <h3>A title</h3> <p>{l s='my content...'}</p> </div> Again, this will be th same for all products Link to comment Share on other sites More sharing options...
KamranMK Posted March 15, 2013 Author Share Posted March 15, 2013 Hi Nemo, long time no see Would this create a tab below the product or add a text above the buy button? I want it to have a text above a buy button Link to comment Share on other sites More sharing options...
NemoPS Posted March 15, 2013 Share Posted March 15, 2013 This will be added in the tabs section (more info/data sheet...) Link to comment Share on other sites More sharing options...
KamranMK Posted March 15, 2013 Author Share Posted March 15, 2013 This will be added in the tabs section (more info/data sheet...) But is it possible to add above the buy now button? Link to comment Share on other sites More sharing options...
NemoPS Posted March 15, 2013 Share Posted March 15, 2013 Aw, i thought you mean a tab by extra info, for that line 431, before this {if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE} <span class="exclusive"> <span></span> {l s='Add to cart'} </span> {else} <p id="add_to_cart" class="buttons_bottom_block"> <span></span> <input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" /> </p> {/if} Link to comment Share on other sites More sharing options...
Recommended Posts