tId()) { foreach ($this->_rates as $rate) { $rate->setAddress($this); } } } return $this->_rates; } /** * Retrieve all address shipping rates * * @return array */ public function getAllShippingRates() { $rates = array(); foreach ($this->getShippingRatesCollection() as $rate) { if (!$rate->isDeleted()) { $rates[] = $rate; } } return $rates; } /** * Retrieve all grouped shipping rates * * @return array */ public function getGroupedAllShippingRates() { $rates = array(); foreach ($this->getShippingRatesCollection() as $rate) { if (!$rate->isDeleted() && $rate->getCarrierInstance()) { if (!isset($rates[$rate->getCarrier()])) { $rates[$rate->getCarrier()] = array(); } $rates[$rate->getCarrier()][] = $rate; $rates[$rate->getCarrier()][0]->carrier_sort_order = $rate->getCarrierInstance()->getSortOrder(); } } uasort($rates, array($this, '_sortRates')); return $rates; } /** * Sort rates recursive callback * * @param array $a * @param array $b * @return int */ protected function _sortRates($a, $b) { if ((int)$a[0]->carrier_sort_order < (int)$b[0]->carrier_sort_order) { return -1; } elseif ((int)$a[0]->carrier_sort_order > (int)$b[0]->carrier_sort_order) { return 1; } else { return 0; } } /** * Retrieve shipping rate by identifier * * @param int $rateId * @return Mage_Sales_Model_Quote_Address_Rate | false */ public function getShippingRateById($rateId) { foreach ($this->getShippingRatesCollection() as $rate) { if ($rate->getId()==$rateId) { return $rate; } } return false; } /** * Retrieve shipping rate by code * * @param string $code * @return Mage_Sales_Model_Quote_Address_Rate */ public function getShippingRateByCode($code) { foreach ($this->getShippingRatesCollection() as $rate) { if ($rate->getCode()==$code) { return $rate; } } return false; } /** * Mark all shipping rates as deleted * * @return Mage_Sales_Model_Quote_Address */ public function removeAllShippingRates() { foreach ($this->getShippingRatesCollection() as $rate) { $rate->isDeleted(true); } return $this; } /** * Add shipping rate * * @param Mage_Sales_Model_Quote_Address_Rate $rate * @return Mage_Sales_Model_Quote_Address */ public function addShippingRate(Mage_Sales_Model_Quote_Address_Rate $rate) { $rate->setAddress($this); $this->getShippingRatesCollection()->addItem($rate); return $this; } /** * Collecting shipping rates by address * * @return Mage_Sales_Model_Quote_Address */ public function collectShippingRates() { if (!$this->getCollectShippingRates()) { return $this; } $this->setCollectShippingRates(false); $this->removeAllShippingRates(); if (!$this->getCountryId()) { return $this; } $found = $this->requestShippingRates(); if (!$found) { $this->setShippingAmount(0) ->setBaseShippingAmount(0) ->setShippingMethod('') ->setShippingDescription(''); } return $this; } /** * Request shipping rates for entire address or specified address item * Returns true if current selected shipping method code corresponds to one of the found rates * * @param Mage_Sales_Model_Quote_Item_Abstract $item * @return bool */ public function requestShippingRates(Mage_Sales_Model_Quote_Item_Abstract $item = null) { /** @var $request Mage_Shipping_Model_Rate_Request */ $request = Mage::getModel('shipping/rate_request'); $request->setAllItems($item ? array($item) : $this->getAllItems()); $request->setDestCountryId($this->getCountryId()); $request->setDestRegionId($this->getRegionId()); $request->setDestRegionCode($this->getRegionCode()); /** * need to call getStreet with -1 * to get data in string instead of array */ $request->setDestStreet($this->getStreet(-1)); $request->setDestCity($this->getCity()); $request->setDestPostcode($this->getPostcode()); $request->setPackageValue($item ? $item->getBaseRowTotal() : $this->getBaseSubtotal()); $packageValueWithDiscount = $item ? $item->getBaseRowTotal() - $item->getBaseDiscountAmount() : $this->getBaseSubtotalWithDiscount(); $request->setPackageValueWithDiscount($packageValueWithDiscount); $request->setPackageWeight($item ? $item->getRowWeight() : $this->getWeight()); $request->setPackageQty($item ? $item->getQty() : $this->getItemQty()); /** * Need for shipping methods that use insurance based on price of physical products */ $packagePhysicalValue = $item ? $item->getBaseRowTotal() : $this->getBaseSubtotal() - $this->getBaseVirtualAmount(); $request->setPackagePhysicalValue($packagePhysicalValue); $request->setFreeMethodWeight($item ? 0 : $this->getFreeMethodWeight()); /** * Store and website identifiers need specify from quote */ /*$request->setStoreId(Mage::app()->getStore()->getId()); $request->setWebsiteId(Mage::app()->getStore()->getWebsiteId());*/ $request->setStoreId($this->getQuote()->getStore()->getId()); $request->setWebsiteId($this->getQuote()->getStore()->getWebsiteId()); $request->setFreeShipping($this->getFreeShipping()); /** * Currencies need to convert in free shipping */ $request->setBaseCurrency($this->getQuote()->getStore()->getBaseCurrency()); $request->setPackageCurrency($this->getQuote()->getStore()->getCurrentCurrency()); $request->setLimitCarrier($this->getLimitCarrier()); $result = Mage::getModel('shipping/shipping')->collectRates($request)->getResult(); $found = false; if ($result) { $shippingRates = $result->getAllRates(); foreach ($shippingRates as $shippingRate) { $rate = Mage::getModel('sales/quote_address_rate') ->importShippingRate($shippingRate); if (!$item) { $this->addShippingRate($rate); } if ($this->getShippingMethod() == $rate->getCode()) { if ($item) { $item->setBaseShippingAmount($rate->getPrice()); } else { /** * possible bug: this should be setBaseShippingAmount(), * see Mage_Sales_Model_Quote_Address_Total_Shipping::collect() * where this value is set again from the current specified rate price * (looks like a workaround for this bug) */ $this->setShippingAmount($rate->getPrice()); } $found = true; } } } return $found; } /** * Get totals collector model * * @return Mage_Sales_Mo Creion buze Revlon Colorstay - 10 Pink

Creion buze Revlon Colorstay - 10 Pink

Fi primul care comenteaza acest produs

Disponibilitate: In stoc

Pret: 27,00 Lei

Pret Special: 15,00 Lei

OR

Descriere scurta

Creion Buze Revlon <br>*Buzele perfecte se bazeaza pe un creion perfect care sa mentina culoarea in interiorul conturului. <br>*Nu ezita sa folosesti conturul de buze apropiat nuantei de ruj folosita pentru un aspect ingrijit si controlat.

Creion buze Revlon Colorstay - 10 Pink

Plasati Mouse-ul peste imagine pentru zoom

Imagini

Details

Creion Buze Revlon <br>*Buzele perfecte se bazeaza pe un creion perfect care sa mentina culoarea in interiorul conturului. <br>*Nu ezita sa folosesti conturul de buze apropiat nuantei de ruj folosita pentru un aspect ingrijit si controlat.

Informatii suplimentare

Visibility Catalog, Search
Reviews No
Special Price 15,00 Lei

Taguri

Alte persoane au adaugat aceste tags:

Folositi spatiu pentru a separa tagurile. Folositi (') pentru fraze.