コード例 #1
0
ファイル: Product.php プロジェクト: buttasg/cowgirlk
 /**
  * @param Mage_CatalogInventory_Model_Stock_Item $stockItem
  *
  * @return float|int
  */
 protected function _getStackPriceMultiplicator($stockItem)
 {
     $priceMultiplier = 1;
     if ($stockItem->getEnableQtyIncrements()) {
         $stackQuantity = ceil($stockItem->getQtyIncrements());
         if ($stackQuantity > 1) {
             $priceMultiplier = $stackQuantity;
         }
     }
     return $priceMultiplier;
 }
コード例 #2
0
ファイル: Item.php プロジェクト: NatashaOlut/Mage_Test
 /**
  * @magentoConfigFixture current_store cataloginventory/item_options/enable_qty_increments 1
  */
 public function testSetGetEnableQtyIncrements()
 {
     $this->assertFalse($this->_model->getEnableQtyIncrements());
     $this->_model->setUseConfigEnableQtyInc(true);
     $this->assertTrue($this->_model->getEnableQtyIncrements());
 }