ฉันกำลังสร้างเว็บไซต์ Magento ตอนนี้ฉันต้องตั้งค่ากฎที่จะอนุญาตให้ลูกค้าซื้อในปริมาณขั้นต่ำภายในหมวดหมู่ได้ ฉันจึงเข้าใจว่ามันเป็นกฎระดับหมวดหมู่ ตัวอย่างเช่น ลูกค้าสามารถซื้อผลิตภัณฑ์ขั้นต่ำ 6 รายการจากหมวดเสื้อเชิ้ต
ฉันได้ลองแก้ไข link.phtml
แล้ว แต่อนุญาตให้ฉันตั้งกฎภายในเว็บไซต์ทั้งหมดเท่านั้น ไม่ใช่ตามหมวดหมู่
นี่คือรหัสของฉัน:
<?php if ($this->EnableOnepagecheckout()):?>
<?php if(Mage::helper('checkout/cart')->getCart()->getItemsQty() >= 1):?>
<button type="button" title="<?php echo $this->__('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if (!$this->checkEnable()){ echo 'no-checkout'; }?>"<?php if (!$this->checkEnable()){ echo ' disabled="disabled" ';} ?> onclick="window.location='<?php echo $this->getOnepageCheckoutUrl() ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button>
<?php endif?>
<?php endif?>