Magento Quick Modification
Need a snippet of code with an “IF” statement that determines this:
If subcategories = id# 1,2,3, (etc.) then change quantity to decimals
If attribute = name, name2, etc. then use integers for the quantity
Here’s the code that is currently NOT working properly:
<?php $_product = $this->getProduct(); ?>
<?php $currentCategory = Mage::registry(‘current_category’); ?>
<?php if($_product->isSaleable()): ?>
<fieldset class=”add-to-cart-box”>
<legend><?php echo $this->__(‘Add Items to Cart’) ?></legend>
<?php if(!$_product->isGrouped()): ?>
<span class=”qty-box”><label for=”qty”><?php echo $this->__(‘Qty’) ?>:</label>
<!–<input name=”qty” type=”text” class=”input-text qty” id=”qty” maxlength=”12″ value=”<?php //echo $this->getMinimalQty($_product) ?>” />–>
<?php $color=$_product->getResource()->getAttribute(‘Color’); ?>
<?php $designer=$_product->getResource()->getAttribute(‘Designer’); ?>
<?php if(((isset ($currentCategory))