public function getCoupons() { $couponDao = new CouponDao(); $customerId = Mage::getSingleton('customer/session')->getId(); $coupons = $couponDao->getOverviewByCustomerId($customerId); return $coupons; }
public function getStampCard() { $couponDao = new CouponDao(); $customerId = Mage::getSingleton('customer/session')->getId(); $coupons = $couponDao->getOverviewByCustomerId($customerId); foreach ($coupons as $coupon) { $aantal = $coupon['aantalproducten']; $duurste = $coupon['duursteproduct']; $value = array_values($coupon); } return $coupons; }
public function getStampCard() { $stampcard = $this->getCustomer()->getPrimaryShippingAddress(); $couponDao = new CouponDao(); $customerId = Mage::getSingleton('customer/session')->getId(); $coupons = $couponDao->getOverviewByCustomerId($customerId); foreach ($coupons as $coupon) { $aantal = $coupon['aantalproducten']; $duurste = $coupon['duursteproduct']; $value = array_values($coupon); echo " copuon {$aantal} en {$duurste}"; Mage::log("data {$value}", null, 'custom.log'); } return $coupons; // if( $stampcard instanceof Varien_Object ) { // return $stampcard->format('html'); // } else { // return Mage::helper('customer')->__('You have not set a default shipping address.'); // } }