Exemple #1
0
 /**
  * @param ShopgateCartCustomer $c
  */
 public function visitCartCustomer(ShopgateCartCustomer $c)
 {
     $properties = $c->buildProperties();
     // iterate the simple variables
     $properties = $this->iterateSimpleProperties($properties);
     // iterate the customer_groups
     $properties['customer_groups'] = $this->iterateObjectList($properties['customer_groups']);
     // set last value to converted array
     $this->array = $properties;
 }
 /**
  * @param ShopgateCart $cart
  * @return ShopgateCartCustomer
  */
 protected function _getCustomerGroups(ShopgateCart $cart)
 {
     $customer = new ShopgateCartCustomer();
     $group = new ShopgateCartCustomerGroup();
     $group->setId($cart->getExternalCustomerGroupId() ? $cart->getExternalCustomerGroupId() : Configuration::get('PS_UNIDENTIFIED_GROUP'));
     $customer->setCustomerGroups(array($group));
     return $customer;
 }