// BugFix with id_address_delivery
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10595 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+9
-5
@@ -1094,6 +1094,9 @@ class CartCore extends ObjectModel
|
|||||||
$warehouse_carrier_list = array();
|
$warehouse_carrier_list = array();
|
||||||
foreach ($product_list as &$product)
|
foreach ($product_list as &$product)
|
||||||
{
|
{
|
||||||
|
if ((int)$product['id_address_delivery'] == 0)
|
||||||
|
$product['id_address_delivery'] = (int)$this->id_address_delivery;
|
||||||
|
|
||||||
if (!isset($warehouse_count_by_address[$product['id_address_delivery']]))
|
if (!isset($warehouse_count_by_address[$product['id_address_delivery']]))
|
||||||
$warehouse_count_by_address[$product['id_address_delivery']] = array();
|
$warehouse_count_by_address[$product['id_address_delivery']] = array();
|
||||||
|
|
||||||
@@ -1500,12 +1503,13 @@ class CartCore extends ObjectModel
|
|||||||
public function getAddressCollection()
|
public function getAddressCollection()
|
||||||
{
|
{
|
||||||
$collection = array();
|
$collection = array();
|
||||||
foreach (Db::getInstance()->executeS('SELECT DISTINCT `id_address_delivery`
|
$result = Db::getInstance()->executeS('SELECT DISTINCT `id_address_delivery`
|
||||||
FROM `'._DB_PREFIX_.'cart_product`
|
FROM `'._DB_PREFIX_.'cart_product`
|
||||||
WHERE id_cart = '.(int)$this->id)
|
WHERE id_cart = '.(int)$this->id);
|
||||||
as $row
|
$result[] = array('id_address_delivery' => (int)$this->id_address_delivery);
|
||||||
)
|
foreach ($result as $row)
|
||||||
$collection[$row['id_address_delivery']] = new Address($row['id_address_delivery']);
|
if ((int)$row['id_address_delivery'] != 0)
|
||||||
|
$collection[(int)$row['id_address_delivery']] = new Address((int)$row['id_address_delivery']);
|
||||||
return $collection;
|
return $collection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
<div class="delivery_options">
|
<div class="delivery_options">
|
||||||
{foreach $option_list as $key => $option}
|
{foreach $option_list as $key => $option}
|
||||||
<div class="delivery_option {if ($option@index % 2)}alternate_{/if}item">
|
<div class="delivery_option {if ($option@index % 2)}alternate_{/if}item">
|
||||||
<input class="delivery_option_radio" type="radio" name="delivery_option[{$id_address}]" {if $opc}onclick="updateCarrierSelectionAndGift();"{/if} id="delivery_option_{$id_address}_{$option@index}" value="{$key}" {if $delivery_option[$id_address] == $key}selected="selected"{/if} />
|
<input class="delivery_option_radio" type="radio" name="delivery_option[{$id_address}]" {if $opc}onclick="updateCarrierSelectionAndGift();"{/if} id="delivery_option_{$id_address}_{$option@index}" value="{$key}" {if $delivery_option[$id_address] == $key}checked="checked"{/if} />
|
||||||
<label for="delivery_option_{$id_address}_{$option@index}">
|
<label for="delivery_option_{$id_address}_{$option@index}">
|
||||||
<table class="resume">
|
<table class="resume">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user