Beispiel #1
0
 /**
  * Set Group reduction if needed
  */
 public function setGroupReduction()
 {
     return GroupReduction::setProductReduction($this->id);
 }
 /**
  * Set Group reduction if needed
  */
 public function setGroupReduction()
 {
     $row = GroupReduction::getGroupByCategoryId((int) $this->id_category_default);
     if (!$row) {
         if (!GroupReduction::deleteProductReduction((int) $this->id)) {
             return false;
         }
     } else {
         if (!GroupReduction::setProductReduction((int) $this->id, $row['id_group'], (int) $this->id_category_default, (double) $row['reduction'])) {
             return false;
         }
     }
     return true;
 }
Beispiel #3
0
 /**
  * Set Group reduction if needed
  */
 public function setGroupReduction()
 {
     return GroupReduction::setProductReduction($this->id, null, $this->id_category_default);
 }