Example #1
0
 public static function isValid(Product $OSCOM_Product)
 {
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     return $OSCOM_Product->getQuantity() - $OSCOM_ShoppingCart->getQuantity($OSCOM_ShoppingCart->getBasketID($OSCOM_Product->getID())) > 0;
 }
Example #2
0
     }
     break;
 case 'PRODUCT_LIST_MANUFACTURER':
     $lc_align = '';
     $lc_text = ' ';
     if ($OSCOM_Product->hasManufacturer()) {
         $lc_text = ' ' . osc_link_object(OSCOM::getLink(null, 'Index', 'manufacturers=' . $OSCOM_Product->getManufacturerID()), $OSCOM_Product->getManufacturer()) . ' ';
     }
     break;
 case 'PRODUCT_LIST_PRICE':
     $lc_align = 'right';
     $lc_text = ' ' . $OSCOM_Product->getPriceFormated() . ' ';
     break;
 case 'PRODUCT_LIST_QUANTITY':
     $lc_align = 'right';
     $lc_text = ' ' . $OSCOM_Product->getQuantity() . ' ';
     break;
 case 'PRODUCT_LIST_WEIGHT':
     $lc_align = 'right';
     $lc_text = ' ' . $OSCOM_Product->getWeight() . ' ';
     break;
 case 'PRODUCT_LIST_IMAGE':
     $lc_align = 'center';
     if (isset($_GET['manufacturers'])) {
         $lc_text = osc_link_object(OSCOM::getLink(null, 'Products', $OSCOM_Product->getKeyword() . '&manufacturers=' . $_GET['manufacturers']), $OSCOM_Image->show($OSCOM_Product->getImage(), $OSCOM_Product->getTitle()));
     } else {
         $lc_text = ' ' . osc_link_object(OSCOM::getLink(null, 'Products', $OSCOM_Product->getKeyword() . ($OSCOM_Category->getID() > 0 ? '&cPath=' . $OSCOM_Category->getPath() : '')), $OSCOM_Image->show($OSCOM_Product->getImage(), $OSCOM_Product->getTitle())) . ' ';
     }
     break;
 case 'PRODUCT_LIST_BUY_NOW':
     $lc_align = 'center';