Jump to content

[Solved] Adding tab to product pages to show shipping details


Recommended Posts

Good morning all,

 

Using PS 1.5.1.3 default theme

 

I would like to be able to add a tab to every product page that gives all the shipping details, prices/times etc, I know that you can buy modules that create tabs where you can add text, images, videos etc but if I have 2000 products and then the delivery charge increases I would have to change this 2000 times which of course would be a little tedious.

 

So, could I add one tab ( with all the details added ) that would automatically be called when I added a product to the catelogue.

 

If this is not possible then would I be able to add a link on every product page that would take the customer to a Delivery/CMS page

 

Sorry for the long question

 

Hope you can help

 

Paul

Edited by perfumeskunk (see edit history)
  • Like 1
Link to comment
Share on other sites

Ok so find on product.tpl

 

<!-- description and features -->

 

Just before

 

{if isset($accessories) AND $accessories}<li><a href="#idTab4">{l s='Accessories'}</a></li>{/if}

 

add

 

<li><a id="more_info_tab_attachments" href="#idTab9">Delivery</a></li>

 

then before

 

{if isset($accessories) AND $accessories}
 <!-- accessories -->

 

add two breaks and insert

 

<ul id="idTab9" class="bullet">

<h3>Delivery</h3>
<p>CONTENT</p>

</ul>

 

That should insert a new tab called delivery for you. Any problems shout :)

Edited by cocothecat (see edit history)
  • Like 5
Link to comment
Share on other sites

Yeah exactly that :)

 

Just add some extra <p></p> where you need paragraphs and you can create lists as well if you wanted to show something like

  • Delivery Point 1 XX
  • Delivery Point 2 XX

<ul>
<li>Delivery Point 1 XX</li>
<li>Delivery Point 2 XX</li>
</ul>

 

You might find doing that though that the default prestashop ul and li class might put the spcaing off so if that happens and you want to use a list ill post up some more code :)

 

Good Luck

Edited by cocothecat (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...
  • 4 weeks later...

Hello everyone, I use Prestashop 1.4.6
would be possible that the
shipping cost appeared under the item price?
the price of a fixed carrier.
Each item would have a different price depending on weight.
Something like "shipping from ..."

Thanks

Link to comment
Share on other sites

  • 2 months later...

Hello everyone, I use Prestashop 1.4.6

would be possible that the shipping cost appeared under the item price?

the price of a fixed carrier.

Each item would have a different price depending on weight.

Something like "shipping from ..."

Thanks

I'd really like to able to do this too. Been searching for weeks trying to find a way to do it!

Link to comment
Share on other sites

  • 3 months later...

Ok so find on product.tpl

 

<!-- description and features -->

 

Just before

 

{if isset($accessories) AND $accessories}<li><a href="#idTab4">{l s='Accessories'}</a></li>{/if}
add

 

<li><a id="more_info_tab_attachments" href="#idTab9">Delivery</a></li>
then before

 

{if isset($accessories) AND $accessories}
  <!-- accessories -->
add two breaks and insert

 

<ul id="idTab9" class="bullet">

<h3>Delivery</h3>
<p>CONTENT</p>

</ul>
That should insert a new tab called delivery for you. Any problems shout :)

 

How can I add manufacturer Tab on product detail page in prestashop 1.5.4?

Link to comment
Share on other sites

  • 1 year later...

Ok so find on product.tpl

 

<!-- description and features -->

 

Just before

 

{if isset($accessories) AND $accessories}<li><a href="#idTab4">{l s='Accessories'}</a></li>{/if}
add

 

<li><a id="more_info_tab_attachments" href="#idTab9">Delivery</a></li>
then before

 

{if isset($accessories) AND $accessories}
  <!-- accessories -->
add two breaks and insert

 

<ul id="idTab9" class="bullet">

<h3>Delivery</h3>
<p>CONTENT</p>

</ul>
That should insert a new tab called delivery for you. Any problems shout smile.png

 

Nice solution thanks.

Link to comment
Share on other sites

I also worked out how to add the additional shipping cost, it was so simple in the end!

 

{convertPrice price=$product->additional_shipping_cost} displays it without taxes

 

To quickly get it to show with UK VAT at 20% I used 

 

{convertPrice price=$product->additional_shipping_cost * 1.2}

 

You could combine this with the tabs and get a really nice function :)

Link to comment
Share on other sites

  • 7 months later...

Ok so find on product.tpl

 

<!-- description and features -->

 

Just before

 

{if isset($accessories) AND $accessories}<li><a href="#idTab4">{l s='Accessories'}</a></li>{/if}
add

 

<li><a id="more_info_tab_attachments" href="#idTab9">Delivery</a></li>
then before

 

{if isset($accessories) AND $accessories}
  <!-- accessories -->
add two breaks and insert

 

<ul id="idTab9" class="bullet">

<h3>Delivery</h3>
<p>CONTENT</p>

</ul>
That should insert a new tab called delivery for you. Any problems shout smile.png

 

 

Unfortunately the content from the new tab is also showing on first tab if open the page. Any solution for that?

 

Prestashop 1.6.3

Link to comment
Share on other sites

  • 1 year later...

Any solution ??

Thanks

In Prestashop 1.6 there are no tabs anymore, so you need to add the next code:

 

<section id="shipping-info" class="page-product-box">
          <h3 class="page-product-heading">{l s='Shipping info'}</h3>
          <div class="shipping-info-block">
          <p> CONTENT </p>
          </div>
</section>

before or after 

 {if isset($HOOK_PRODUCT_FOOTER) && $HOOK_PRODUCT_FOOTER}{$HOOK_PRODUCT_FOOTER}{/if}

Hope it helps.

Edited by alexandrabatrak (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...