示例#1
0
文件: ubsk.php 项目: camigreen/ttop
 public function importItem($item = null)
 {
     parent::importItem($item);
     $this->id = 'ubsk';
     $this->confirm = true;
     $this->price_group = 'ubsk.' . $this->getOption('kit_class')->get('value', 'A') . ($this->getOption('shade_type')->get('value') ? '.' . $this->getOption('shade_type')->get('value') : '');
     $this->type = 'ubsk';
     $this->make = "LaPorte's T-Top Boat Covers";
 }
示例#2
0
文件: ccc.php 项目: camigreen/ttop
 public function importItem($item = null)
 {
     parent::importItem($item);
     $this->id = 'ccc';
     $this->confirm = true;
     $this->type = 'ccc';
     $this->name = 'Center Console Curtain';
     $this->make = "LaPorte's T-Top Boat Covers";
     $this->price_group = 'ccc.' . $this->getOption('class')->get('value', 'B');
 }
示例#3
0
文件: item.php 项目: camigreen/ttop
 public function create($item, $type = null)
 {
     if (!isset($item->sku) || !isset($this->_items[$item->sku])) {
         $class = $type . 'StoreItem';
         if ($type) {
             if (file_exists($this->app->path->path('classes:store/items/' . $type . '.php'))) {
                 $this->app->loader->register($class, 'classes:store/items/' . $type . '.php');
                 $storeItem = new $class($this->app);
             } else {
                 $storeItem = new StoreItem($this->app);
             }
         } else {
             $storeItem = new StoreItem($this->app);
         }
         $storeItem->importItem($item);
         // fire event
         $this->app->event->dispatcher->notify($this->app->event->create($storeItem, 'storeitem:init'));
         $this->_items[$storeItem->sku] = $storeItem;
         return $this->_items[$storeItem->sku];
     }
     return $this->_items[$item->sku];
 }
示例#4
0
 public function importItem($item = null)
 {
     parent::importItem($item);
     $this->price_group = 'ttopboatcover.' . $this->attributes['boat_length']->get('value');
     if ($item instanceof Item) {
         $this->name = 'T-Top Boat Cover';
         $this->attributes['boat_model'] = $this->app->data->create();
         $this->attributes['boat_model']->set('name', 'Boat Model');
         $this->attributes['boat_model']->set('value', $item->name);
         $this->attributes['boat_model']->set('text', $item->name);
     }
     $this->confirm = true;
     $this->make = "LaPorte's T-Top Boat Covers";
     $this->model = 'T-Top Boat Cover ' . $this->attributes['oem']->get('name') . ' ' . $this->attributes['boat_length']->get('value');
 }
示例#5
0
文件: bsk.php 项目: camigreen/ttop
 public function importItem($item = null)
 {
     parent::importItem($item);
     if (!$item instanceof Item) {
         if (isset($item['fromCart']) && $item['fromCart']) {
             $this->id = 'bsk-' . $this->options['kit_type']->get('value', 'aft');
         } else {
             $this->id = 'bsk';
         }
     } else {
         $this->id = 'bsk';
     }
     $this->confirm = true;
     $this->price_group = 'bsk.' . $this->getOption('kit_class')->get('value', 'B');
     $this->type = 'bsk';
     $this->make = "LaPorte's T-Top Boat Covers";
 }
示例#6
0
文件: price.php 项目: camigreen/ttop
 /**
  * Set the Item
  *
  * @param 	StoreItem	$item 	StoreItem Class Object
  *
  * @return 	Price 	$this	Support for chaining.
  *
  * @since 1.0
  */
 public function setItem(StoreItem $item)
 {
     $this->_item = $item;
     $this->setGroup($item->getPriceGroup());
     $this->setMarkupRate($item->markup);
     return $this;
 }