Alldo Group Posted October 3, 2011 Share Posted October 3, 2011 Hello! I need to change the quantity from 1, to 2 in some of our categories. We have a huge amount of attributes (over 500 combination on each product) so we can't use the built in function. This is what I am trying to do: {if $smarty.get.id_category == 5 OR $product->id_category_default == 5} <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}2{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> {else} <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> {/if} But Smarty does not seem to recognize the following string values?! {if $smarty.get.id_category == 5 OR $product->id_category_default == 5} (Nothing happens) When adding {php} {/php} around the line {if $smarty.get.id_category == 5 OR $product->id_category_default == 5}, I do not know how to echo the original form input html code? Anyone have a solution to this? It would have been extremly much appriciated =) Huge thanks in advance... Link to comment Share on other sites More sharing options...
Alldo Group Posted October 4, 2011 Author Share Posted October 4, 2011 *bump* Link to comment Share on other sites More sharing options...
tomerg3 Posted October 4, 2011 Share Posted October 4, 2011 You should consider mass changing the minimal quantity for the products you need to 2, you can do that directly in the database, it would be better than hard coding it in the tpl file. 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