Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -379,8 +379,8 @@ class AuthControllerCore extends FrontController
|
||||
$this->errors[] = Tools::displayError('An account using this email address has already been registered.', false);
|
||||
// Preparing customer
|
||||
$customer = new Customer();
|
||||
$lastnameAddress = $_POST['lastname'];
|
||||
$firstnameAddress = $_POST['firstname'];
|
||||
$lastnameAddress = Tools::getValue('lastname');
|
||||
$firstnameAddress = Tools::getValue('firstname');
|
||||
$_POST['lastname'] = Tools::getValue('customer_lastname');
|
||||
$_POST['firstname'] = Tools::getValue('customer_firstname');
|
||||
|
||||
|
||||
@@ -405,9 +405,11 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
if (!$this->isLogged)
|
||||
{
|
||||
$carriers = $this->context->cart->simulateCarriersOutput();
|
||||
$oldMessage = Message::getMessageByCartId((int)($this->context->cart->id));
|
||||
$this->context->smarty->assign(array(
|
||||
'HOOK_EXTRACARRIER' => null,
|
||||
'HOOK_EXTRACARRIER_ADDR' => null,
|
||||
'oldMessage' => isset($oldMessage['message'])? $oldMessage['message'] : '',
|
||||
'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array(
|
||||
'carriers' => $carriers,
|
||||
'checked' => $this->context->cart->simulateCarrierSelectedOutput(),
|
||||
@@ -494,6 +496,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
|
||||
$wrapping_fees = $this->context->cart->getGiftWrappingPrice(false);
|
||||
$wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice();
|
||||
$oldMessage = Message::getMessageByCartId((int)($this->context->cart->id));
|
||||
|
||||
$vars = array(
|
||||
'free_shipping' => false, // Deprecated since a cart rule can be applied the specific carriers only
|
||||
@@ -513,6 +516,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
'delivery_option' => $delivery_option,
|
||||
'address_collection' => $this->context->cart->getAddressCollection(),
|
||||
'opc' => true,
|
||||
'oldMessage' => isset($oldMessage['message'])? $oldMessage['message'] : '',
|
||||
'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array(
|
||||
'carriers' => $carriers,
|
||||
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
||||
@@ -538,6 +542,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
)),
|
||||
'carrier_block' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-carrier.tpl')
|
||||
);
|
||||
|
||||
Cart::addExtraCarriers($result);
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -47,10 +47,15 @@ function p1540_add_missing_columns()
|
||||
$list_fields[$k] = $field['Field'];
|
||||
|
||||
if (!in_array('id_shop', $list_fields))
|
||||
if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` ADD `id_shop` INT( 10 ) UNSIGNED NOT NULL DEFAULT "1" AFTER `id_attribute_group` '))
|
||||
if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` ADD `id_shop` INT( 10 ) UNSIGNED NOT NULL DEFAULT "1" AFTER `id_attribute_group`'))
|
||||
$errors[] = Db::getInstance()->getMsgError();
|
||||
}
|
||||
|
||||
|
||||
$key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'stock_available` WHERE KEY_NAME = "product_sqlstock"');;
|
||||
if (is_array($key_exists))
|
||||
if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'stock_available` DROP INDEX `product_sqlstock`'))
|
||||
$errors[] = Db::getInstance()->getMsgError();
|
||||
|
||||
if (count($errors))
|
||||
return array('error' => 1, 'msg' => implode(',', $errors)) ;
|
||||
}
|
||||
@@ -33,7 +33,8 @@ CREATE TABLE `PREFIX_tab_module_preference` (
|
||||
|
||||
/* PHP:add_new_tab(AdminMarketing, es:Marketing|it:Marketing|en:Marketing|de:Marketing|fr:Marketing, 1); */;
|
||||
|
||||
ALTER TABLE `PREFIX_stock_available` DROP INDEX `product_sqlstock`;
|
||||
/* PHP:p1540_add_missing_columns(); */;
|
||||
|
||||
ALTER TABLE `PREFIX_stock_available` ADD UNIQUE `product_sqlstock` (`id_product`, `id_product_attribute`, `id_shop`, `id_shop_group`);
|
||||
|
||||
UPDATE PREFIX_configuration SET `value` = '8388608' WHERE `name` = 'PS_PRODUCT_PICTURE_MAX_SIZE' AND `value` <= '524288';
|
||||
|
||||
@@ -163,7 +163,7 @@ class BlockCategories extends Module
|
||||
$groups = implode(', ', Customer::getGroupsStatic((int)$this->context->customer->id));
|
||||
$maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH');
|
||||
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
|
||||
SELECT DISTINCT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
|
||||
FROM `'._DB_PREFIX_.'category` c
|
||||
INNER JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.(int)$this->context->language->id.Shop::addSqlRestrictionOnLang('cl').')
|
||||
INNER JOIN `'._DB_PREFIX_.'category_shop` cs ON (cs.`id_category` = c.`id_category` AND cs.`id_shop` = '.(int)$this->context->shop->id.')
|
||||
@@ -238,7 +238,7 @@ class BlockCategories extends Module
|
||||
$maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH');
|
||||
$groups = implode(', ', Customer::getGroupsStatic((int)$this->context->customer->id));
|
||||
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
|
||||
SELECT DISTINCT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
|
||||
FROM `'._DB_PREFIX_.'category` c
|
||||
'.Shop::addSqlAssociation('category', 'c').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.(int)$this->context->language->id.Shop::addSqlRestrictionOnLang('cl').')
|
||||
|
||||
@@ -1267,10 +1267,11 @@ a.iframe {font-weight:bold}
|
||||
width:723px;
|
||||
border:1px solid #ccc
|
||||
}
|
||||
|
||||
#order-opc #opc_delivery_methods #message {
|
||||
width: 757px;
|
||||
}
|
||||
#order-opc #opc_payment_methods {margin-bottom:20px}
|
||||
#order-opc #opc_payment_methods #opc_payment_methods-content p{margin:0}
|
||||
|
||||
.delivery_option_carrier td {width:200px}
|
||||
.delivery_option_carrier td + td {width:280px;}
|
||||
.delivery_option_carrier td + td + td {width:200px}
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
<h3>{l s='Leave a message'}</h3>
|
||||
<div>
|
||||
<p>{l s='If you would like to add a comment about your order, please write it in the field below.'}</p>
|
||||
<p><textarea cols="120" rows="3" name="message" id="message">{if isset($oldMessage)}{$oldMessage}{/if}</textarea></p>
|
||||
<p><textarea cols="120" rows="3" name="message" id="message">{if isset($oldMessage)}{$oldMessage|escape:'htmlall':'UTF-8'}{/if}</textarea></p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user