alejcak Posted March 20, 2013 Share Posted March 20, 2013 (edited) Hi, I am new to all this and I am having a fair bit of trouble getting the information out of my Smarty post array. I have Prestashop v1.48 installed and I'm trying to get the information form this form that I created. <tr id="product_{$product.id_product}_{$product.id_product_attribute}" class="{if $smarty.foreach.productLoop.last}last_item{elseif $smarty.foreach.productLoop.first}first_item{/if}{if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0}alternate_item{/if} cart_item"> <td class="cart_checkbox"> <input type="checkbox" name="customGB[]" formmethod="post" value="{$product.name}" /> </td> <td class="cart_product"> <a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" {if isset($smallSize)}width="{$smallSize.width}" height="{$smallSize.height}" {/if} /></a> </td> </tr> I can call back the information in another page but only 1 at a time by the following code {$smarty.post.customGB[0]} Any ideas on how to call back all the variables inside the array?? Edited March 21, 2013 by alejcak (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted March 20, 2013 Share Posted March 20, 2013 maybe try to display array {$smarty.post|print_r} and you will get more informations about that Link to comment Share on other sites More sharing options...
alejcak Posted March 21, 2013 Author Share Posted March 21, 2013 Thanks for that. It wasn't exactly what I was after but it will be useful. I found exactly what I wanted(see below) {foreach $smarty.post.customGB as $gb} {$gb}<br/> {/foreach} 1 Link to comment Share on other sites More sharing options...
vekia Posted March 21, 2013 Share Posted March 21, 2013 thanks for sharing your solution :-) 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