REPrint Posted September 25, 2017 Share Posted September 25, 2017 Hi! I have a strange situation. I need to load on product.tpl 2 special pack. I know the IDs. I make some coding and, when i call like {foreach from=$buytogetherId item=buyId} {assign var='buyt' value=Pack::getItems($buyId, $cookie->id_lang)} {$buyt|print_r} {include file="$tpl_dir./product-list.tpl" products=$buyt} {/foreach} i have error: Warning: array_key_exists(): The first argument should be either a string or an integer in /home/r52276hqto/public_html/classes/Pack.php on line 119Warning: Illegal offset type in /home/r52276hqto/public_html/classes/Pack.php on line 149 HOW CAN I LOAD THIS IN PRODUCT VIEW Link to comment Share on other sites More sharing options...
catalin.pop Posted September 25, 2017 Share Posted September 25, 2017 The warnings come from Pack::getItems($buyId, $cookie->id_lang); Make sure $buyId is string or integer. try to print it before getting items see what is the result {foreach from=$buytogetherId item=buyId} {$buyId} Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now