示例#1
0
 function TableOrderItemAttributes(&$db)
 {
     $tbl_key = 'orderitemattribute_id';
     $tbl_suffix = 'orderitemattributes';
     $name = 'j2store';
     parent::__construct("#__{$name}_{$tbl_suffix}", $tbl_key, $db);
 }
示例#2
0
 function TableShippingRates($db)
 {
     $tbl_key = 'shipping_rate_id';
     $tbl_suffix = 'shippingrates';
     $this->set('_suffix', $tbl_suffix);
     $name = 'j2store';
     parent::__construct("#__{$name}_{$tbl_suffix}", $tbl_key, $db);
 }
示例#3
0
 function TableProductQuantities(&$db)
 {
     $tbl_key = 'productquantity_id';
     $tbl_suffix = 'productquantities';
     $this->set('_suffix', $tbl_suffix);
     $name = 'j2store';
     parent::__construct("#__{$name}_{$tbl_suffix}", $tbl_key, $db);
 }
示例#4
0
 function bind($array, $ignore = '')
 {
     if (key_exists('plugins', $array) && is_array($array['plugins'])) {
         $registry = new JRegistry();
         $registry->loadArray($array['plugins']);
         $array['plugins'] = $registry->toString();
     }
     return parent::bind($array, $ignore);
 }
示例#5
0
 /**
  * @param database A database connector object
  */
 function TableMyCart(&$db)
 {
     $keynames = array();
     $keynames['user_id'] = 'user_id';
     $keynames['session_id'] = 'session_id';
     $keynames['product_id'] = 'product_id';
     $keynames['product_attributes'] = 'product_attributes';
     $this->setKeyNames($keynames);
     parent::__construct('#__j2store_mycart', 'cart_id', $db);
 }
示例#6
0
 function TablePrices(&$db)
 {
     parent::__construct('#__j2store_prices', 'price_id', $db);
 }
示例#7
0
 /**
  * @param database A database connector object
  */
 function __construct(&$db)
 {
     parent::__construct('#__categories', 'id', $db);
 }
示例#8
0
 /**
  * @param database A database connector object
  */
 function __construct(&$db)
 {
     parent::__construct('#__content', 'id', $db);
 }
示例#9
0
 function store($updateNulls = false)
 {
     $date = JFactory::getDate();
     if ($this->id) {
         // Existing item
         $this->updated_at = $date->toUnix();
     }
     if ($return = parent::store($updateNulls = false)) {
         $dispatcher = JDispatcher::getInstance();
         JPluginHelper::importPlugin('j2store');
         $dispatcher->trigger("onJ2StoreAfterOrder", array($this->id));
     }
     return true;
 }
示例#10
0
 /**
  * @param database A database connector object
  */
 function __construct(&$db)
 {
     parent::__construct('#__j2store_address', 'id', $db);
 }