Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
{if isset($product->id)}
|
{if isset($product->id)}
|
||||||
<input type="hidden" name="submitted_tabs[]" value="Quantities" />
|
<input type="hidden" name="submitted_tabs[]" value="Quantities" />
|
||||||
<h4>{l s='Available quantities for sale'}</h4>
|
<h4>{l s='Available quantities for sale'}</h4>
|
||||||
|
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Quantities"}
|
||||||
<div class="separation"></div>
|
<div class="separation"></div>
|
||||||
<div class="hint" style="display:block; position:'auto';">
|
<div class="hint" style="display:block; position:'auto';">
|
||||||
<p>{l s='This interface allows you to manage the available quantities for sale of the current product and its combinations on the current shop.'}</p>
|
<p>{l s='This interface allows you to manage the available quantities for sale of the current product and its combinations on the current shop.'}</p>
|
||||||
@@ -206,8 +207,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-left"><label>{l s='Displayed text when in-stock:'}</label></td>
|
<td class="col-left">
|
||||||
<td style="padding-bottom:5px;">
|
{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}
|
||||||
|
<label>{l s='Displayed text when in-stock:'}</label>
|
||||||
|
</td>
|
||||||
|
<td style="padding-bottom:5px;" class="col-right">
|
||||||
{include file="controllers/products/input_text_lang.tpl"
|
{include file="controllers/products/input_text_lang.tpl"
|
||||||
languages=$languages
|
languages=$languages
|
||||||
input_value=$product->available_now
|
input_value=$product->available_now
|
||||||
@@ -216,8 +220,11 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="col-left"><label>{l s='Displayed text when allowed to be back-ordered:'}</label></td>
|
<td class="col-left">
|
||||||
<td style="padding-bottom:5px;">
|
{include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"}
|
||||||
|
<label>{l s='Displayed text when allowed to be back-ordered:'}</label>
|
||||||
|
</td>
|
||||||
|
<td style="padding-bottom:5px;" class="col-right">
|
||||||
{include file="controllers/products/input_text_lang.tpl"
|
{include file="controllers/products/input_text_lang.tpl"
|
||||||
languages=$languages
|
languages=$languages
|
||||||
input_value=$product->available_later
|
input_value=$product->available_later
|
||||||
|
|||||||
+8
-6
@@ -337,12 +337,6 @@ class AddressCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public static function initialize($id_address = null)
|
public static function initialize($id_address = null)
|
||||||
{
|
{
|
||||||
// set the default address
|
|
||||||
$address = new Address();
|
|
||||||
$address->id_country = (int)Context::getContext()->country->id;
|
|
||||||
$address->id_state = 0;
|
|
||||||
$address->postcode = 0;
|
|
||||||
|
|
||||||
// if an id_address has been specified retrieve the address
|
// if an id_address has been specified retrieve the address
|
||||||
if ($id_address)
|
if ($id_address)
|
||||||
{
|
{
|
||||||
@@ -351,6 +345,14 @@ class AddressCore extends ObjectModel
|
|||||||
if (!Validate::isLoadedObject($address))
|
if (!Validate::isLoadedObject($address))
|
||||||
throw new PrestaShopException('Invalid address');
|
throw new PrestaShopException('Invalid address');
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// set the default address
|
||||||
|
$address = new Address();
|
||||||
|
$address->id_country = (int)Context::getContext()->country->id;
|
||||||
|
$address->id_state = 0;
|
||||||
|
$address->postcode = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return $address;
|
return $address;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-3
@@ -1509,9 +1509,8 @@ class CartCore extends ObjectModel
|
|||||||
|
|
||||||
// If the cart rule offers a reduction, the amount is prorated (with the products in the package)
|
// If the cart rule offers a reduction, the amount is prorated (with the products in the package)
|
||||||
if ($cart_rule['obj']->reduction_percent > 0 || $cart_rule['obj']->reduction_amount > 0)
|
if ($cart_rule['obj']->reduction_percent > 0 || $cart_rule['obj']->reduction_amount > 0)
|
||||||
{
|
|
||||||
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_REDUCTION, $package, $use_cache), 2);
|
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_REDUCTION, $package, $use_cache), 2);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$order_total_discount = min(Tools::ps_round($order_total_discount, 2), $wrapping_fees + $order_total_products + $shipping_fees);
|
$order_total_discount = min(Tools::ps_round($order_total_discount, 2), $wrapping_fees + $order_total_products + $shipping_fees);
|
||||||
@@ -2600,7 +2599,10 @@ class CartCore extends ObjectModel
|
|||||||
|
|
||||||
// Select carrier tax
|
// Select carrier tax
|
||||||
if ($use_tax && !Tax::excludeTaxeOption())
|
if ($use_tax && !Tax::excludeTaxeOption())
|
||||||
$carrier_tax = $carrier->getTaxesRate(new Address((int)$address_id));
|
{
|
||||||
|
$address = Address::initialize((int)$address_id);
|
||||||
|
$carrier_tax = $carrier->getTaxesRate($address);
|
||||||
|
}
|
||||||
|
|
||||||
$configuration = Configuration::getMultiple(array(
|
$configuration = Configuration::getMultiple(array(
|
||||||
'PS_SHIPPING_FREE_PRICE',
|
'PS_SHIPPING_FREE_PRICE',
|
||||||
|
|||||||
+1
-1
@@ -418,7 +418,7 @@ class HookCore extends ObjectModel
|
|||||||
else if ($hook_retro_callable)
|
else if ($hook_retro_callable)
|
||||||
$display = $moduleInstance->{'hook'.$retro_hook_name}($hook_args);
|
$display = $moduleInstance->{'hook'.$retro_hook_name}($hook_args);
|
||||||
// Live edit
|
// Live edit
|
||||||
if ($array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')))
|
if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')))
|
||||||
{
|
{
|
||||||
$live_edit = true;
|
$live_edit = true;
|
||||||
$output .= self::wrapLiveEdit($display, $moduleInstance, $array['id_hook']);
|
$output .= self::wrapLiveEdit($display, $moduleInstance, $array['id_hook']);
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ abstract class PaymentModuleCore extends Module
|
|||||||
foreach ($data['package_list'] as $id_package)
|
foreach ($data['package_list'] as $id_package)
|
||||||
{
|
{
|
||||||
// Rewrite the id_warehouse
|
// Rewrite the id_warehouse
|
||||||
$package_list[$id_address][$id_package]['id_warehouse'] = $this->context->cart->getPackageIdWarehouse($package_list[$id_address][$id_package], (int)$id_carrier);
|
$package_list[$id_address][$id_package]['id_warehouse'] = (int)$this->context->cart->getPackageIdWarehouse($package_list[$id_address][$id_package], (int)$id_carrier);
|
||||||
$package_list[$id_address][$id_package]['id_carrier'] = $id_carrier;
|
$package_list[$id_address][$id_package]['id_carrier'] = $id_carrier;
|
||||||
}
|
}
|
||||||
// Make sure CarRule caches are empty
|
// Make sure CarRule caches are empty
|
||||||
|
|||||||
@@ -252,12 +252,6 @@ class FrontControllerCore extends Controller
|
|||||||
CartRule::autoAddToCart($this->context);
|
CartRule::autoAddToCart($this->context);
|
||||||
}
|
}
|
||||||
|
|
||||||
$locale = strtolower(Configuration::get('PS_LOCALE_LANGUAGE')).'_'.strtoupper(Configuration::get('PS_LOCALE_COUNTRY').'.UTF-8');
|
|
||||||
setlocale(LC_COLLATE, $locale);
|
|
||||||
setlocale(LC_CTYPE, $locale);
|
|
||||||
setlocale(LC_TIME, $locale);
|
|
||||||
setlocale(LC_NUMERIC, 'en_US.UTF-8');
|
|
||||||
|
|
||||||
/* get page name to display it in body id */
|
/* get page name to display it in body id */
|
||||||
|
|
||||||
// Are we in a payment module
|
// Are we in a payment module
|
||||||
@@ -402,10 +396,8 @@ class FrontControllerCore extends Controller
|
|||||||
if ($this->restrictedCountry)
|
if ($this->restrictedCountry)
|
||||||
$this->displayRestrictedCountryPage();
|
$this->displayRestrictedCountryPage();
|
||||||
|
|
||||||
//live edit
|
if (Tools::isSubmit('live_edit') && !$this->checkLiveEditAccess())
|
||||||
if (Tools::isSubmit('live_edit') && ($ad = Tools::getValue('ad')) && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')))
|
die(Tools::displayError());
|
||||||
if (!is_dir(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$ad))
|
|
||||||
die(Tools::displayError());
|
|
||||||
|
|
||||||
$this->iso = $iso;
|
$this->iso = $iso;
|
||||||
$this->setMedia();
|
$this->setMedia();
|
||||||
@@ -413,7 +405,7 @@ class FrontControllerCore extends Controller
|
|||||||
$this->context->cart = $cart;
|
$this->context->cart = $cart;
|
||||||
$this->context->currency = $currency;
|
$this->context->currency = $currency;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function postProcess()
|
public function postProcess()
|
||||||
{
|
{
|
||||||
/*// For retrocompatibility with versions before 1.5, preProcess support will be removed on next release
|
/*// For retrocompatibility with versions before 1.5, preProcess support will be removed on next release
|
||||||
@@ -549,23 +541,24 @@ class FrontControllerCore extends Controller
|
|||||||
'display_header' => $this->display_header,
|
'display_header' => $this->display_header,
|
||||||
'display_footer' => $this->display_footer,
|
'display_footer' => $this->display_footer,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$live_edit_content = '';
|
||||||
// Don't use live edit if on mobile device
|
// Don't use live edit if on mobile device
|
||||||
if ($this->context->getMobileDevice() == false && Tools::isSubmit('live_edit'))
|
if (!$this->context->getMobileDevice() && $this->checkLiveEditAccess())
|
||||||
$this->context->smarty->assign('live_edit', $this->getLiveEditFooter());
|
$live_edit_content = $this->getLiveEditFooter();
|
||||||
|
|
||||||
$layout = $this->getLayout();
|
$layout = $this->getLayout();
|
||||||
if ($layout)
|
if ($layout)
|
||||||
{
|
{
|
||||||
if ($this->template)
|
if ($this->template)
|
||||||
$this->context->smarty->assign('template', $this->context->smarty->fetch($this->template));
|
$this->context->smarty->assign('template', $this->context->smarty->fetch($this->template).$live_edit_content);
|
||||||
else // For retrocompatibility with 1.4 controller
|
else // For retrocompatibility with 1.4 controller
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
$this->displayContent();
|
$this->displayContent();
|
||||||
$template = ob_get_contents();
|
$template = ob_get_contents();
|
||||||
ob_clean();
|
ob_clean();
|
||||||
$this->context->smarty->assign('template', $template);
|
$this->context->smarty->assign('template', $template.$live_edit_content);
|
||||||
}
|
}
|
||||||
$this->smartyOutputContent($layout);
|
$this->smartyOutputContent($layout);
|
||||||
}
|
}
|
||||||
@@ -583,16 +576,9 @@ class FrontControllerCore extends Controller
|
|||||||
|
|
||||||
if ($this->display_footer)
|
if ($this->display_footer)
|
||||||
$this->smartyOutputContent(_PS_THEME_DIR_.'footer.tpl');
|
$this->smartyOutputContent(_PS_THEME_DIR_.'footer.tpl');
|
||||||
|
|
||||||
// live edit
|
|
||||||
if (Tools::isSubmit('live_edit') && ($ad = Tools::getValue('ad')) && Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')))
|
|
||||||
{
|
|
||||||
$this->context->smarty->assign(array('ad' => $ad, 'live_edit' => true));
|
|
||||||
$this->smartyOutputContent(_PS_ALL_THEMES_DIR_.'live_edit.tpl');
|
|
||||||
}
|
|
||||||
// END - 1.4 retrocompatibility - will be removed in 1.6
|
// END - 1.4 retrocompatibility - will be removed in 1.6
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -799,16 +785,21 @@ class FrontControllerCore extends Controller
|
|||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function checkLiveEditAccess()
|
||||||
|
{
|
||||||
|
$live_token = Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee'));
|
||||||
|
$ad = Tools::getValue('ad');
|
||||||
|
return Tools::isSubmit('live_edit') && $ad && Tools::getValue('liveToken') == $live_token && is_dir(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$ad);
|
||||||
|
}
|
||||||
|
|
||||||
public function getLiveEditFooter()
|
public function getLiveEditFooter()
|
||||||
{
|
{
|
||||||
if (Tools::isSubmit('live_edit')
|
if ($this->checkLiveEditAccess())
|
||||||
&& ($ad = Tools::getValue('ad'))
|
|
||||||
&& Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')))
|
|
||||||
{
|
{
|
||||||
$data = $this->context->smarty->createData();
|
$data = $this->context->smarty->createData();
|
||||||
$data->assign(array(
|
$data->assign(array(
|
||||||
'ad' => $ad,
|
'ad' => Tools::getValue('ad'),
|
||||||
'live_edit' => true,
|
'live_edit' => true,
|
||||||
'hook_list' => Hook::$executed_hooks,
|
'hook_list' => Hook::$executed_hooks,
|
||||||
'id_shop' => $this->context->shop->id
|
'id_shop' => $this->context->shop->id
|
||||||
@@ -1144,12 +1135,12 @@ class FrontControllerCore extends Controller
|
|||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function initLogoAndFavicon()
|
public function initLogoAndFavicon()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'favicon_url' => _PS_IMG_.Configuration::get('PS_FAVICON'),
|
'favicon_url' => _PS_IMG_.Configuration::get('PS_FAVICON'),
|
||||||
'logo_image_width' => ($this->context->getMobileDevice() == false ? Configuration::get('SHOP_LOGO_WIDTH') : Configuration::get('SHOP_LOGO_MOBILE_WIDTH')),
|
'logo_image_width' => ($this->context->getMobileDevice() == false ? Configuration::get('SHOP_LOGO_WIDTH') : Configuration::get('SHOP_LOGO_MOBILE_WIDTH')),
|
||||||
'logo_image_height' => ($this->context->getMobileDevice() == false ? Configuration::get('SHOP_LOGO_HEIGHT') : Configuration::get('SHOP_LOGO_MOBILE_HEIGHT')),
|
'logo_image_height' => ($this->context->getMobileDevice() == false ? Configuration::get('SHOP_LOGO_HEIGHT') : Configuration::get('SHOP_LOGO_MOBILE_HEIGHT')),
|
||||||
'logo_url' => ($this->context->getMobileDevice() == false ? _PS_IMG_.Configuration::get('PS_LOGO').'?'.Configuration::get('PS_IMG_UPDATE_TIME') : _PS_IMG_.Configuration::get('PS_LOGO_MOBILE').'?'.Configuration::get('PS_IMG_UPDATE_TIME'))
|
'logo_url' => ($this->context->getMobileDevice() == false ? _PS_IMG_.Configuration::get('PS_LOGO').'?'.Configuration::get('PS_IMG_UPDATE_TIME') : _PS_IMG_.Configuration::get('PS_LOGO_MOBILE').'?'.Configuration::get('PS_IMG_UPDATE_TIME'))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
|
|||||||
// Set the image path on display in relation to the header image
|
// Set the image path on display in relation to the header image
|
||||||
case 'header':
|
case 'header':
|
||||||
if (in_array($this->wsObject->method, array('GET','HEAD','PUT')))
|
if (in_array($this->wsObject->method, array('GET','HEAD','PUT')))
|
||||||
$path = _PS_IMG_DIR_.'logo.jpg';
|
$path = _PS_IMG_DIR_.Configuration::get('PS_LOGO');
|
||||||
else
|
else
|
||||||
throw new WebserviceException('This method is not allowed with general image resources.', array(49, 405));
|
throw new WebserviceException('This method is not allowed with general image resources.', array(49, 405));
|
||||||
break;
|
break;
|
||||||
@@ -387,7 +387,7 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
|
|||||||
{
|
{
|
||||||
case 'GET':
|
case 'GET':
|
||||||
case 'HEAD':
|
case 'HEAD':
|
||||||
$this->imgToDisplay = ($path != '' && file_exists($path)) ? $path : $alternative_path;
|
$this->imgToDisplay = ($path != '' && file_exists($path) && is_file($path)) ? $path : $alternative_path;
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
case 'PUT':
|
case 'PUT':
|
||||||
|
|||||||
@@ -107,6 +107,13 @@ Context::getContext()->country = $defaultCountry;
|
|||||||
/* It is not safe to rely on the system's timezone settings, and this would generate a PHP Strict Standards notice. */
|
/* It is not safe to rely on the system's timezone settings, and this would generate a PHP Strict Standards notice. */
|
||||||
@date_default_timezone_set(Configuration::get('PS_TIMEZONE'));
|
@date_default_timezone_set(Configuration::get('PS_TIMEZONE'));
|
||||||
|
|
||||||
|
/* Set locales */
|
||||||
|
$locale = strtolower(Configuration::get('PS_LOCALE_LANGUAGE')).'_'.strtoupper(Configuration::get('PS_LOCALE_COUNTRY').'.UTF-8');
|
||||||
|
setlocale(LC_COLLATE, $locale);
|
||||||
|
setlocale(LC_CTYPE, $locale);
|
||||||
|
setlocale(LC_TIME, $locale);
|
||||||
|
setlocale(LC_NUMERIC, 'en_US.UTF-8');
|
||||||
|
|
||||||
/* Instantiate cookie */
|
/* Instantiate cookie */
|
||||||
|
|
||||||
|
|
||||||
@@ -122,7 +129,7 @@ else
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$domains = null;
|
$domains = null;
|
||||||
if(Context::getContext()->shop->domain != Context::getContext()->shop->domain_ssl)
|
if (Context::getContext()->shop->domain != Context::getContext()->shop->domain_ssl)
|
||||||
$domains = array(Context::getContext()->shop->domain_ssl, Context::getContext()->shop->domain);
|
$domains = array(Context::getContext()->shop->domain_ssl, Context::getContext()->shop->domain);
|
||||||
|
|
||||||
$cookie = new Cookie('ps-s'.Context::getContext()->shop->id, '', $cookie_lifetime, $domains);
|
$cookie = new Cookie('ps-s'.Context::getContext()->shop->id, '', $cookie_lifetime, $domains);
|
||||||
@@ -153,7 +160,7 @@ else
|
|||||||
{
|
{
|
||||||
$customer = new Customer();
|
$customer = new Customer();
|
||||||
|
|
||||||
// Change the default group
|
// Change the default group
|
||||||
if (Group::isFeatureActive())
|
if (Group::isFeatureActive())
|
||||||
$customer->id_default_group = Configuration::get('PS_UNIDENTIFIED_GROUP');
|
$customer->id_default_group = Configuration::get('PS_UNIDENTIFIED_GROUP');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ class AdminEmailsControllerCore extends AdminController
|
|||||||
if (isset($_POST['PS_SHOP_EMAIL']))
|
if (isset($_POST['PS_SHOP_EMAIL']))
|
||||||
$_POST['PS_SHOP_EMAIL'] = Configuration::get('PS_SHOP_EMAIL');
|
$_POST['PS_SHOP_EMAIL'] = Configuration::get('PS_SHOP_EMAIL');
|
||||||
|
|
||||||
if ($_POST['PS_MAIL_METHOD'] == 2 && (empty($_POST['PS_MAIL_SERVER']) || empty($_POST['PS_MAIL_SMTP_PORT'])))
|
if (isset($_POST['PS_MAIL_METHOD']) && $_POST['PS_MAIL_METHOD'] == 2 && (empty($_POST['PS_MAIL_SERVER']) || empty($_POST['PS_MAIL_SMTP_PORT'])))
|
||||||
$this->errors[] = Tools::displayError('You must define an SMTP server and an SMTP port. If you do not know, use the PHP mail() function instead.');
|
$this->errors[] = Tools::displayError('You must define an SMTP server and an SMTP port. If you do not know, use the PHP mail() function instead.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ class AdminHomeControllerCore extends AdminController
|
|||||||
$opti_list = array();
|
$opti_list = array();
|
||||||
if ($rewrite + $htaccessOptimized + $smartyOptimized + $cccOptimized + $shopEnabled + $htaccessAfterUpdate + $indexRebuiltAfterUpdate != 14)
|
if ($rewrite + $htaccessOptimized + $smartyOptimized + $cccOptimized + $shopEnabled + $htaccessAfterUpdate + $indexRebuiltAfterUpdate != 14)
|
||||||
{
|
{
|
||||||
$this->context->smarty->assign('hide_tips', Configuration::get('PS_HIDE_OPTIMIZATION_TIPS'));
|
|
||||||
$opti_list[] = array(
|
$opti_list[] = array(
|
||||||
'title' => $this->l('URL rewriting'),
|
'title' => $this->l('URL rewriting'),
|
||||||
'href' => $link->getAdminLink('AdminMeta'),
|
'href' => $link->getAdminLink('AdminMeta'),
|
||||||
@@ -145,8 +144,12 @@ class AdminHomeControllerCore extends AdminController
|
|||||||
'image' => $lights[$htaccessAfterUpdate]['image'],
|
'image' => $lights[$htaccessAfterUpdate]['image'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$this->context->smarty->assign('opti_list', $opti_list);
|
$this->context->smarty->assign(array(
|
||||||
$this->context->smarty->assign('content', $content);
|
'opti_list' => $opti_list,
|
||||||
|
'content' => $content,
|
||||||
|
'hide_tips' => Configuration::get('PS_HIDE_OPTIMIZATION_TIPS'))
|
||||||
|
);
|
||||||
|
|
||||||
$template = $this->createTemplate('optimizationTips.tpl');
|
$template = $this->createTemplate('optimizationTips.tpl');
|
||||||
return $template->fetch();
|
return $template->fetch();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -462,6 +462,7 @@ class AdminModulesControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
$this->errors[] = Tools::displayError('Cannot load module object');
|
$this->errors[] = Tools::displayError('Cannot load module object');
|
||||||
|
$this->errors = array_merge($this->errors, $module->getErrors());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$this->errors[] = Tools::displayError('You do not have permission to add here.');
|
$this->errors[] = Tools::displayError('You do not have permission to add here.');
|
||||||
@@ -688,6 +689,7 @@ class AdminModulesControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
elseif ($echo === false)
|
elseif ($echo === false)
|
||||||
$module_errors[] = array('name' => $name, 'message' => $module->getErrors());
|
$module_errors[] = array('name' => $name, 'message' => $module->getErrors());
|
||||||
|
|
||||||
if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && isset(Context::getContext()->tmpOldShop))
|
if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && isset(Context::getContext()->tmpOldShop))
|
||||||
{
|
{
|
||||||
Context::getContext()->shop = clone(Context::getContext()->tmpOldShop);
|
Context::getContext()->shop = clone(Context::getContext()->tmpOldShop);
|
||||||
|
|||||||
@@ -536,13 +536,17 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$this->errors[] = Tools::displayError('You cannot delete the product because there is physical stock left or supply orders in progress.');
|
$this->errors[] = Tools::displayError('You cannot delete the product because there is physical stock left or supply orders in progress.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->delete())
|
if (!count($this->errors))
|
||||||
{
|
{
|
||||||
$id_category = (int)Tools::getValue('id_category');
|
if ($object->delete())
|
||||||
$category_url = empty($id_category) ? '' : '&id_category='.(int)$id_category;
|
{
|
||||||
$this->redirect_after = self::$currentIndex.'&conf=1&token='.$this->token.$category_url;
|
$id_category = (int)Tools::getValue('id_category');
|
||||||
|
$category_url = empty($id_category) ? '' : '&id_category='.(int)$id_category;
|
||||||
|
$this->redirect_after = self::$currentIndex.'&conf=1&token='.$this->token.$category_url;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$this->errors[] = Tools::displayError('An error occurred during deletion.');
|
||||||
}
|
}
|
||||||
$this->errors[] = Tools::displayError('An error occurred during deletion.');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -632,10 +636,8 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
$real_quantity = $stock_manager->getProductRealQuantities($product->id, 0);
|
$real_quantity = $stock_manager->getProductRealQuantities($product->id, 0);
|
||||||
if ($physical_quantity > 0 || $real_quantity > $physical_quantity)
|
if ($physical_quantity > 0 || $real_quantity > $physical_quantity)
|
||||||
$this->errors[] = sprintf(Tools::displayError('You cannot delete the product #%d because there is physical stock left or supply orders in progress.'), $product->id);
|
$this->errors[] = sprintf(Tools::displayError('You cannot delete the product #%d because there is physical stock left or supply orders in progress.'), $product->id);
|
||||||
else
|
|
||||||
$success &= $product->delete();
|
|
||||||
}
|
}
|
||||||
else
|
if (!count($this->errors))
|
||||||
$success &= $product->delete();
|
$success &= $product->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ class AddressControllerCore extends FrontController
|
|||||||
|
|
||||||
// Assign common vars
|
// Assign common vars
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'onr_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'),
|
'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'),
|
||||||
'ajaxurl' => _MODULE_DIR_,
|
'ajaxurl' => _MODULE_DIR_,
|
||||||
'errors' => $this->errors,
|
'errors' => $this->errors,
|
||||||
'token' => Tools::getToken(false),
|
'token' => Tools::getToken(false),
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ class AuthControllerCore extends FrontController
|
|||||||
$days = Tools::dateDays();
|
$days = Tools::dateDays();
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'onr_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'),
|
'one_phone_at_least' => (int)Configuration::get('PS_ONE_PHONE_AT_LEAST'),
|
||||||
'years' => $years,
|
'years' => $years,
|
||||||
'sl_year' => (isset($selectedYears) ? $selectedYears : 0),
|
'sl_year' => (isset($selectedYears) ? $selectedYears : 0),
|
||||||
'months' => $months,
|
'months' => $months,
|
||||||
|
|||||||
@@ -1226,6 +1226,8 @@ product_tabs['Quantities'] = new function(){
|
|||||||
self.refreshQtyAvailabilityForm();
|
self.refreshQtyAvailabilityForm();
|
||||||
self.ajaxCall({actionQty: 'out_of_stock', value: $(this).val()});
|
self.ajaxCall({actionQty: 'out_of_stock', value: $(this).val()});
|
||||||
});
|
});
|
||||||
|
if (display_multishop_checkboxes)
|
||||||
|
ProductMultishop.checkAllQuantities();
|
||||||
|
|
||||||
self.refreshQtyAvailabilityForm();
|
self.refreshQtyAvailabilityForm();
|
||||||
};
|
};
|
||||||
@@ -1574,6 +1576,15 @@ var ProductMultishop = new function()
|
|||||||
ProductMultishop.checkField($('input[name=\'multishop_check[link_rewrite]['+v.id_lang+']\']').prop('checked'), 'link_rewrite_'+v.id_lang);
|
ProductMultishop.checkField($('input[name=\'multishop_check[link_rewrite]['+v.id_lang+']\']').prop('checked'), 'link_rewrite_'+v.id_lang);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.checkAllQuantities = function()
|
||||||
|
{
|
||||||
|
$.each(languages, function(k, v)
|
||||||
|
{
|
||||||
|
ProductMultishop.checkField($('input[name=\'multishop_check[available_later]['+v.id_lang+']\']').prop('checked'), 'available_later_'+v.id_lang);
|
||||||
|
ProductMultishop.checkField($('input[name=\'multishop_check[available_now]['+v.id_lang+']\']').prop('checked'), 'available_now_'+v.id_lang);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
this.checkAllAssociations = function()
|
this.checkAllAssociations = function()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
<li class="item"><a href="{$cmslink.link|addslashes}" title="{$cmslink.meta_title|escape:'htmlall':'UTF-8'}">{$cmslink.meta_title|escape:'htmlall':'UTF-8'}</a></li>
|
<li class="item"><a href="{$cmslink.link|addslashes}" title="{$cmslink.meta_title|escape:'htmlall':'UTF-8'}">{$cmslink.meta_title|escape:'htmlall':'UTF-8'}</a></li>
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<li id="header_link_sitemap"><a href="{$link->getPageLink('sitemap')}" title="{l s='sitemap' mod='blockpermanentlinks'}">{l s='Sitemap' mod='blockpermanentlinks'}</a></li>
|
<li><a href="{$link->getPageLink('sitemap')}" title="{l s='sitemap' mod='blockcms'}">{l s='Sitemap' mod='blockcms'}</a></li>
|
||||||
{if $display_poweredby}<li class="last_item">{l s='Powered by' mod='blockcms'} <a target="_blank" href="http://www.prestashop.com">PrestaShop</a>™</li>{/if}
|
{if $display_poweredby}<li class="last_item">{l s='Powered by' mod='blockcms'} <a target="_blank" href="http://www.prestashop.com">PrestaShop</a>™</li>{/if}
|
||||||
</ul>
|
</ul>
|
||||||
{$footer_text}
|
{$footer_text}
|
||||||
|
|||||||
@@ -41,9 +41,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ie9 #featured-products_block_center .product_image span.new{top:-18px;right:-38px}
|
.ie9 #featured-products_block_center .product_image span.new{top:-18px;right:-38px}
|
||||||
.ie8 #featured-products_block_center .product_image span.new{top:-18px;right:-38px}
|
.ie8 #featured-products_block_center .product_image span.new{top:-21px;right:-38px}
|
||||||
.ie8 #featured-products_block_center .product_image span.new {top:-17px;}
|
|
||||||
.ie7 #featured-products_block_center .product_image span.new {top:-30px;right:-25px}
|
|
||||||
.lt-ie6 #featured-products_block_center .product_image span.new {top:-30px;right:-25px}
|
.lt-ie6 #featured-products_block_center .product_image span.new {top:-30px;right:-25px}
|
||||||
|
|
||||||
#featured-products_block_center .product_desc {height:45px;}
|
#featured-products_block_center .product_desc {height:45px;}
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ $(function(){ldelim}
|
|||||||
<label for="other">{l s='Additional information'}</label>
|
<label for="other">{l s='Additional information'}</label>
|
||||||
<textarea id="other" name="other" cols="26" rows="3">{if isset($smarty.post.other)}{$smarty.post.other}{else}{if isset($address->other)}{$address->other}{/if}{/if}</textarea>
|
<textarea id="other" name="other" cols="26" rows="3">{if isset($smarty.post.other)}{$smarty.post.other}{else}{if isset($address->other)}{$address->other}{/if}{/if}</textarea>
|
||||||
</p>
|
</p>
|
||||||
{if $onr_phone_at_least}
|
{if $one_phone_at_least}
|
||||||
<p class="inline-infos required">{l s='You must register at least one phone number'} <sup class="required">*</sup></p>
|
<p class="inline-infos required">{l s='You must register at least one phone number'} <sup class="required">*</sup></p>
|
||||||
{/if}
|
{/if}
|
||||||
<p class="text">
|
<p class="text">
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ $(function(){ldelim}
|
|||||||
<label for="other">{l s='Additional information'}</label>
|
<label for="other">{l s='Additional information'}</label>
|
||||||
<textarea name="other" id="other" cols="26" rows="3">{if isset($smarty.post.other)}{$smarty.post.other}{/if}</textarea>
|
<textarea name="other" id="other" cols="26" rows="3">{if isset($smarty.post.other)}{$smarty.post.other}{/if}</textarea>
|
||||||
</p>
|
</p>
|
||||||
{if $onr_phone_at_least}
|
{if $one_phone_at_least}
|
||||||
<p class="inline-infos">{l s='You must register at least one phone number'}</p>
|
<p class="inline-infos">{l s='You must register at least one phone number'}</p>
|
||||||
{/if}
|
{/if}
|
||||||
<p class="text">
|
<p class="text">
|
||||||
@@ -556,7 +556,7 @@ $(function(){ldelim}
|
|||||||
<input type="text" class="text" name="phone" id="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{/if}" />
|
<input type="text" class="text" name="phone" id="phone" value="{if isset($smarty.post.phone)}{$smarty.post.phone}{/if}" />
|
||||||
</p>
|
</p>
|
||||||
<p class="text">
|
<p class="text">
|
||||||
<label for="phone_mobile">{l s='Mobile phone'} {if $onr_phone_at_least}<sup>*</sup>{/if}</label>
|
<label for="phone_mobile">{l s='Mobile phone'} {if $one_phone_at_least}<sup>*</sup>{/if}</label>
|
||||||
<input type="text" class="text" name="phone_mobile" id="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{/if}" />
|
<input type="text" class="text" name="phone_mobile" id="phone_mobile" value="{if isset($smarty.post.phone_mobile)}{$smarty.post.phone_mobile}{/if}" />
|
||||||
</p>
|
</p>
|
||||||
<p class="required text" id="address_alias">
|
<p class="required text" id="address_alias">
|
||||||
|
|||||||
@@ -2079,3 +2079,5 @@ tr.subitem > td:first-child + td {
|
|||||||
padding:0;
|
padding:0;
|
||||||
text-align:center
|
text-align:center
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ie7 #featured-products_block_center .product_image span.new {top:-20px;right:-19px}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 lt-ie6 " lang="en"> <![endif]-->
|
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 lt-ie6 " lang="en"> <![endif]-->
|
||||||
<!--[if IE 7]> <html class="no-js ie7 lt-ie9 lt-ie8" lang="en"> <![endif]-->
|
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8 ie7" lang="en"> <![endif]-->
|
||||||
<!--[if IE 8]> <html class="no-js lt-ie9 ie8" lang="en"> <![endif]-->
|
<!--[if IE 8]> <html class="no-js lt-ie9 ie8" lang="en"> <![endif]-->
|
||||||
<!--[if gt IE 8]> <html lang="fr" class="no-js ie9" lang="en"> <![endif]-->
|
<!--[if gt IE 8]> <html lang="fr" class="no-js ie9" lang="en"> <![endif]-->
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang_iso}">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang_iso}">
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<div id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}>
|
<div id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}>
|
||||||
<br />
|
<br />
|
||||||
<label for="product_reference">{l s='Reference:'} </label>
|
<label>{l s='Reference:'} </label>
|
||||||
<span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span>
|
<span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user