Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getShippingRates()
- {
- if (empty($this->_rates)) {
- $this->getAddress()->collectShippingRates()->save();
- $groups = $this->getAddress()->getGroupedAllShippingRates();
- /*
- if (!empty($groups)) {
- $ratesFilter = new Varien_Filter_Object_Grid();
- $ratesFilter->addFilter(Mage::app()->getStore()->getPriceFilter(), 'price');
- foreach ($groups as $code => $groupItems) {
- $groups[$code] = $ratesFilter->filter($groupItems);
- }
- }
- */
- if ($groups == null) {
- // Hämta fraktsätt baserat på vilket land det är
- // Vad varukorgens summa är
- // Vilken kundgrupp man tillhör (fri frakt eller inte)
- // Returnera de nya fraktsätten
- // return $this->_rates = $newGroups;
- }
- return $this->_rates = $groups;
- }
- return $this->_rates;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement