Jump to content

Display pack content in cart


PsychoZzzorD

Recommended Posts

  • 1 month later...

For something more elaborate like this

 

DlwESr4.png

 

 

 

Add in the file

themes\Your_Theme\shopping-cart-product-line.tpl

above this part

</td>
{if $PS_STOCK_MANAGEMENT}
<td class="cart_avail">  ....

this code

{if Pack::isPack($product.id_product)}{assign var=packItems value=Pack::getItemTable($product.id_product, Context::getContext()->language->id)}
{if $packItems|@count > 0}
<div style="margin-top:20px">
<hr>
{foreach from=$packItems item=packItem}
<p style="font-size:11px;">
<a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)|escape:'html':'UTF-8'}">
<img style=" border: 1px solid #d6d4d4; margin-right: 10px; margin-left: 10px;" src="{$link->getImageLink($packItem.link_rewrite, $packItem.id_image, 'cart_default')|escape:'html':'UTF-8'}" alt="{$packItem.name|escape:'html':'UTF-8'}" width="50" height="50"/></a>
{$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)|escape:'html':'UTF-8'}">{$packItem.name|escape:'html':'UTF-8'}</a></p>
{/foreach}
</div>
{/if}
{/if}
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...