magento - How to change position of product options? -
is there way change position of product options? want show options below product quantity. tried call wrapper.phtml in app/design/frontend/gallins/default/template/catalog/product/view/addtocart.phtml couldn't work.
what have right is:
- option - qty - add cart button but wan't options shown below qty.
addtocart.phtml ->
<?php $_product = $this->getproduct(); ?> <?php $buttontitle = $this->__('add cart'); ?> <?php if ($_product->issaleable()): ?> <div class="add-to-cart"> <?php if (!$_product->isgrouped()): ?> <div class="quantity"> <label for="qty"><?php echo $this->__('qty:') ?></label> <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getproductdefaultqty() * 1 ?>" title="<?php echo $this->__('qty') ?>" class="input-text qty" /> <div class="clear"></div> </div> <?php endif; ?> <!-- want show options --> <button type="button" title="<?php echo $buttontitle ?>" class="button btn-cart" onclick="productaddtocartform.submit(this)"><span><span><?php echo $buttontitle ?></span></span></button> <?php echo $this->getchildhtml('', true, true) ?> </div> i tried <?php echo $this->getchildhtml('wrapper'), didn't work.
you have make 2 changes in 2 files if have product options
in addtocart.phtml
<?php $_product = $this->getproduct(); $_attributes = mage::helper('core')->decoratearray($this->getallowattributes()); ?> <?php $buttontitle = $this->__('add cart'); ?> <?php if($_product->issaleable()): ?> <div class="add-to-cart"> <?php if(!$_product->isgrouped()): ?> <?php if (count($_attributes) == 0):?> <label for="qty"><?php echo $this->__('qty:') ?></label> <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getproductdefaultqty() * 1 ?>" title="<?php echo $this->__('qty') ?>" class="input-text qty" /> <?php endif; ?> <?php endif; ?> <button type="button" title="<?php echo $buttontitle ?>" class="button btn-cart" onclick="productaddtocartform.submit(this)"><span><span><?php echo $buttontitle ?></span></span></button> <?php echo $this->getchildhtml('', true, true) ?> </div> <?php endif; ?> and please change in options\configurable.phtml file change below
<?php $_product = $this->getproduct(); $_attributes = mage::helper('core')->decoratearray($this->getallowattributes()); ?> <?php if ($_product->issaleable() && count($_attributes)):?> <label for="qty"><?php echo $this->__('qty:') ?></label> <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getproductdefaultqty() * 1 ?>" title="<?php echo $this->__('qty') ?>" class="input-text qty" /> <dl> <?php foreach($_attributes $_attribute): ?> <dt><label class="required"><em>*</em><?php echo $_attribute->getlabel() ?></label></dt> <dd<?php if ($_attribute->decoratedislast){?> class="last"<?php }?>> <div class="input-box"> <select name="super_attribute[<?php echo $_attribute->getattributeid() ?>]" id="attribute<?php echo $_attribute->getattributeid() ?>" class="required-entry super-attribute-select"> <option><?php echo $this->__('choose option...') ?></option> </select> </div> </dd> <?php endforeach; ?> </dl> <script type="text/javascript"> var spconfig = new product.config(<?php echo $this->getjsonconfig() ?>); </script> <?php endif;?> let me know if can more.
Comments
Post a Comment