Hello guys.
I have inserted into the products_list.tpl file the following code:
{if $auth.account_type=="S"} {$packs = $smarty.session.product_ids_from_pack} {$real_products_from_packages = $smarty.session.real_products} {foreach from=$packs item=package key=key_pack name="quick_packs"} {$product_id = $product.product_id} {if $product_id == $real_products_from_packages[$key_pack][0].product_id}
{$packs[$key_pack][0].product_code|@print_r:true}
{/if} {/foreach}{$packs = $smarty.session.product_ids_from_pack} {$real_products_from_packages = $smarty.session.real_products} {foreach from=$packs item=package key=key_pack name="quick_packs"} {$product_id = $product.product_id} {if $product_id == $real_products_from_packages[$key_pack][0].product_id} {$prod_pack_id = $packs[$key_pack][0].product_id} <div class="ty-account-info__buttons buttons-container"> <a href="{$config.current_url|fn_url}" data-ca-target-id="{$prod_pack_id}" class="cm-dialog-opener cm-dialog-auto-size ty-btn ty-btn__secondary" rel="nofollow">{__("print_code")}</a> <div id="{$prod_pack_id}" class="hidden" title="{__("print_code")}"> <div class="ty-login-popup">
{**** The following line creates the conflict. If I remove it, the add to cart button works perfect! }
{include file=“addons/my_changes/views/my_changes/my_print_quick.tpl” style=“popup” id=“popup$block2.snapping_id
”}
{****************************************************************************************************}
{/if}
{/foreach}
{/if}
What I want to do is to show a unique code under the image of the product, and show a button which button loads my_print_quick.tpl into a popup box, which then prints a pdf.
When this line is inserted, the add to cart button does not respond at all.
If I comment or remove this line, everything works perfect!
I must say here that as you can see, I show this button after an if statement.
And if this statement is not true, the button is not showing and the add to cart button works perfect.
Does anyone know what the reason is that causes this malfunction??
If you want any other explanations please ask me. I am completely stuck.
Thank you very much in advance.