//Merge branch release
This commit is contained in:
@@ -40,7 +40,7 @@ class BestSalesControllerCore extends FrontController
|
||||
'products' => ProductSale::getBestSales($this->context->language->id, $this->p - 1, $this->n, $this->orderBy, $this->orderWay),
|
||||
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
||||
'nbProducts' => $nbProducts,
|
||||
'homeSize' => Image::getSize('home_default'),
|
||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
|
||||
'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM')
|
||||
));
|
||||
|
||||
|
||||
@@ -120,10 +120,10 @@ class CategoryControllerCore extends FrontController
|
||||
'return_category_name' => Tools::safeOutput($this->category->name),
|
||||
'path' => Tools::getPath($this->category->id),
|
||||
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
||||
'categorySize' => Image::getSize('category_default'),
|
||||
'mediumSize' => Image::getSize('medium_default'),
|
||||
'thumbSceneSize' => Image::getSize('m_scene_default'),
|
||||
'homeSize' => Image::getSize('home_default'),
|
||||
'categorySize' => Image::getSize(ImageType::getFormatedName('category')),
|
||||
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
|
||||
'thumbSceneSize' => Image::getSize(ImageType::getFormatedName('m_scene')),
|
||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
|
||||
'allow_oosp' => (int)Configuration::get('PS_ORDER_OUT_OF_STOCK'),
|
||||
'comparator_max_item' => (int)Configuration::get('PS_COMPARATOR_MAX_ITEM'),
|
||||
'suppliers' => Supplier::getSuppliers()
|
||||
@@ -144,9 +144,9 @@ class CategoryControllerCore extends FrontController
|
||||
{
|
||||
foreach ($sceneImageTypes as $sceneImageType)
|
||||
{
|
||||
if ($sceneImageType['name'] == 'm_scene_default')
|
||||
if ($sceneImageType['name'] == ImageType::getFormatedName('m_scene'))
|
||||
$thumbSceneImageType = $sceneImageType;
|
||||
elseif ($sceneImageType['name'] == 'scene_default')
|
||||
elseif ($sceneImageType['name'] == ImageType::getFormatedName('scene'))
|
||||
$largeSceneImageType = $sceneImageType;
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ class CompareControllerCore extends FrontController
|
||||
'product_features' => $listFeatures,
|
||||
'products' => $listProducts,
|
||||
'width' => $width,
|
||||
'homeSize' => Image::getSize('home_default')
|
||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home'))
|
||||
));
|
||||
$this->context->smarty->assign('HOOK_EXTRA_PRODUCT_COMPARISON', Hook::exec('displayProductComparison', array('list_ids_product' => $ids)));
|
||||
}
|
||||
|
||||
@@ -116,12 +116,12 @@ class ManufacturerControllerCore extends FrontController
|
||||
$this->pagination($nbProducts);
|
||||
|
||||
foreach ($data as &$item)
|
||||
$item['image'] = (!file_exists(_PS_MANU_IMG_DIR_.'/'.$item['id_manufacturer'].'-medium_default.jpg')) ? $this->context->language->iso_code.'-default' : $item['id_manufacturer'];
|
||||
$item['image'] = (!file_exists(_PS_MANU_IMG_DIR_.'/'.$item['id_manufacturer'].'-'.ImageType::getFormatedName('medium').'.jpg')) ? $this->context->language->iso_code.'-default' : $item['id_manufacturer'];
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'pages_nb' => ceil($nbProducts / (int)($this->n)),
|
||||
'nbManufacturers' => $nbProducts,
|
||||
'mediumSize' => Image::getSize('medium_default'),
|
||||
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
|
||||
'manufacturers' => $data,
|
||||
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
||||
));
|
||||
|
||||
@@ -60,7 +60,7 @@ class NewProductsControllerCore extends FrontController
|
||||
'products' => Product::getNewProducts($this->context->language->id, (int)($this->p) - 1, (int)($this->n), false, $this->orderBy, $this->orderWay),
|
||||
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
||||
'nbProducts' => (int)($nbProducts),
|
||||
'homeSize' => Image::getSize('home_default'),
|
||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
|
||||
'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM')
|
||||
));
|
||||
|
||||
|
||||
@@ -141,9 +141,8 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
$this->_processAddressFormat();
|
||||
$this->_assignAddress();
|
||||
// Wrapping fees
|
||||
$wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE'));
|
||||
$wrapping_fees_tax = new Tax((int)(Configuration::get('PS_GIFT_WRAPPING_TAX')));
|
||||
$wrapping_fees_tax_inc = $wrapping_fees * (1 + (((float)($wrapping_fees_tax->rate) / 100)));
|
||||
$wrapping_fees = $this->context->cart->getGiftWrappingPrice(false);
|
||||
$wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice();
|
||||
$return = array_merge(array(
|
||||
'order_opc_adress' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-address.tpl'),
|
||||
'block_user_info' => (isset($blockUserInfo) ? $blockUserInfo->hookTop(array()) : ''),
|
||||
@@ -203,9 +202,8 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
{
|
||||
$result = $this->_getCarrierList();
|
||||
// Wrapping fees
|
||||
$wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE'));
|
||||
$wrapping_fees_tax = new Tax((int)(Configuration::get('PS_GIFT_WRAPPING_TAX')));
|
||||
$wrapping_fees_tax_inc = $wrapping_fees * (1 + (((float)($wrapping_fees_tax->rate) / 100)));
|
||||
$wrapping_fees = $this->context->cart->getGiftWrappingPrice(false);
|
||||
$wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice();
|
||||
$result = array_merge($result, array(
|
||||
'HOOK_TOP_PAYMENT' => Hook::exec('displayPaymentTop'),
|
||||
'HOOK_PAYMENT' => $this->_getPaymentMethods(),
|
||||
@@ -493,9 +491,10 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
|
||||
$carriers = $this->context->cart->simulateCarriersOutput();
|
||||
$delivery_option = $this->context->cart->getDeliveryOption(null, false, false);
|
||||
$wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE'));
|
||||
$wrapping_fees_tax = new Tax((int)(Configuration::get('PS_GIFT_WRAPPING_TAX')));
|
||||
$wrapping_fees_tax_inc = $wrapping_fees * (1 + (((float)($wrapping_fees_tax->rate) / 100)));
|
||||
|
||||
$wrapping_fees = $this->context->cart->getGiftWrappingPrice(false);
|
||||
$wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice();
|
||||
|
||||
$vars = array(
|
||||
'free_shipping' => $free_shipping,
|
||||
'checkedTOS' => (int)($this->context->cookie->checkedTOS),
|
||||
@@ -505,7 +504,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
'conditions' => (int)(Configuration::get('PS_CONDITIONS')),
|
||||
'link_conditions' => $link_conditions,
|
||||
'recyclable' => (int)($this->context->cart->recyclable),
|
||||
'gift_wrapping_price' => (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE')),
|
||||
'gift_wrapping_price' => (float)$wrapping_fees,
|
||||
'total_wrapping_cost' => Tools::convertPrice($wrapping_fees_tax_inc, $this->context->currency),
|
||||
'total_wrapping_tax_exc_cost' => Tools::convertPrice($wrapping_fees, $this->context->currency),
|
||||
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
|
||||
|
||||
@@ -328,9 +328,19 @@ class ParentOrderControllerCore extends FrontController
|
||||
$available_cart_rules = CartRule::getCustomerCartRules($this->context->language->id, (isset($this->context->customer->id) ? $this->context->customer->id : 0), true, true, true, $this->context->cart);
|
||||
$cart_cart_rules = $this->context->cart->getCartRules();
|
||||
foreach ($available_cart_rules as $key => $available_cart_rule)
|
||||
{
|
||||
if (strpos($available_cart_rule['code'], 'BO_ORDER_') === 0)
|
||||
{
|
||||
unset($available_cart_rules[$key]);
|
||||
continue;
|
||||
}
|
||||
foreach ($cart_cart_rules as $cart_cart_rule)
|
||||
if ($available_cart_rule['id_cart_rule'] == $cart_cart_rule['id_cart_rule'])
|
||||
{
|
||||
unset($available_cart_rules[$key]);
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
|
||||
$show_option_allow_separate_package = (!$this->context->cart->isAllProductsInStock(true) && Configuration::get('PS_SHIP_WHEN_AVAILABLE'));
|
||||
|
||||
@@ -470,9 +480,8 @@ class ParentOrderControllerCore extends FrontController
|
||||
protected function _assignWrappingAndTOS()
|
||||
{
|
||||
// Wrapping fees
|
||||
$wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE'));
|
||||
$wrapping_fees_tax = new Tax(Configuration::get('PS_GIFT_WRAPPING_TAX'));
|
||||
$wrapping_fees_tax_inc = $wrapping_fees * (1 + (((float)($wrapping_fees_tax->rate) / 100)));
|
||||
$wrapping_fees = $this->context->cart->getGiftWrappingPrice(false);
|
||||
$wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice();
|
||||
|
||||
// TOS
|
||||
$cms = new CMS(Configuration::get('PS_CONDITIONS_CMS_ID'), $this->context->language->id);
|
||||
@@ -495,7 +504,7 @@ class ParentOrderControllerCore extends FrontController
|
||||
'checked' => $this->context->cart->simulateCarrierSelectedOutput(),
|
||||
'address_collection' => $this->context->cart->getAddressCollection(),
|
||||
'delivery_option' => $this->context->cart->getDeliveryOption(null, false),
|
||||
'gift_wrapping_price' => (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE')),
|
||||
'gift_wrapping_price' => (float)$wrapping_fees,
|
||||
'total_wrapping_cost' => Tools::convertPrice($wrapping_fees_tax_inc, $this->context->currency),
|
||||
'total_wrapping_tax_exc_cost' => Tools::convertPrice($wrapping_fees, $this->context->currency)));
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class PricesDropControllerCore extends FrontController
|
||||
'products' => Product::getPricesDrop($this->context->language->id, (int)$this->p - 1, (int)$this->n, false, $this->orderBy, $this->orderWay),
|
||||
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
||||
'nbProducts' => $nbProducts,
|
||||
'homeSize' => Image::getSize('home_default'),
|
||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
|
||||
'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM')
|
||||
));
|
||||
|
||||
|
||||
@@ -345,15 +345,19 @@ class ProductControllerCore extends FrontController
|
||||
$product_images[(int)$image['id_image']] = $image;
|
||||
}
|
||||
if (!isset($cover))
|
||||
$cover = array('id_image' => $this->context->language->iso_code.'-default', 'legend' => 'No picture', 'title' => 'No picture');
|
||||
$size = Image::getSize('large_default');
|
||||
$cover = array(
|
||||
'id_image' => $this->context->language->iso_code.'-default',
|
||||
'legend' => 'No picture',
|
||||
'title' => 'No picture'
|
||||
);
|
||||
$size = Image::getSize(ImageType::getFormatedName('large'));
|
||||
$this->context->smarty->assign(array(
|
||||
'have_image' => Product::getCover((int)Tools::getValue('id_product')),
|
||||
'cover' => $cover,
|
||||
'imgWidth' => (int)$size['width'],
|
||||
'mediumSize' => Image::getSize('medium_default'),
|
||||
'largeSize' => Image::getSize('large_default'),
|
||||
'homeSize' => Image::getSize('home_default'),
|
||||
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
|
||||
'largeSize' => Image::getSize(ImageType::getFormatedName('large')),
|
||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
|
||||
'col_img_dir' => _PS_COL_IMG_DIR_));
|
||||
if (count($product_images))
|
||||
$this->context->smarty->assign('images', $product_images);
|
||||
|
||||
@@ -81,7 +81,7 @@ class SearchControllerCore extends FrontController
|
||||
'nbProducts' => $search['total'],
|
||||
'search_query' => $query,
|
||||
'instant_search' => $this->instant_search,
|
||||
'homeSize' => Image::getSize('home_default')));
|
||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home'))));
|
||||
}
|
||||
else if (($query = Tools::getValue('search_query', Tools::getValue('ref'))) && !is_array($query))
|
||||
{
|
||||
@@ -97,7 +97,7 @@ class SearchControllerCore extends FrontController
|
||||
'search_products' => $search['result'],
|
||||
'nbProducts' => $search['total'],
|
||||
'search_query' => $query,
|
||||
'homeSize' => Image::getSize('home_default')));
|
||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home'))));
|
||||
}
|
||||
else if (($tag = urldecode(Tools::getValue('tag'))) && !is_array($tag))
|
||||
{
|
||||
@@ -110,7 +110,7 @@ class SearchControllerCore extends FrontController
|
||||
'products' => $result, // DEPRECATED (since to 1.4), not use this: conflict with block_cart module
|
||||
'search_products' => $result,
|
||||
'nbProducts' => $nbProducts,
|
||||
'homeSize' => Image::getSize('home_default')));
|
||||
'homeSize' => Image::getSize(ImageType::getFormatedName('home'))));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -262,7 +262,7 @@ class StoresControllerCore extends FrontController
|
||||
$this->assignStores();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'mediumSize' => Image::getSize('medium_default'),
|
||||
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
|
||||
'defaultLat' => (float)Configuration::get('PS_STORES_CENTER_LAT'),
|
||||
'defaultLong' => (float)Configuration::get('PS_STORES_CENTER_LONG'),
|
||||
'searchUrl' => $this->context->link->getPageLink('stores'),
|
||||
|
||||
@@ -119,12 +119,12 @@ class SupplierControllerCore extends FrontController
|
||||
|
||||
$suppliers = Supplier::getSuppliers(true, $this->context->language->id, true, $this->p, $this->n);
|
||||
foreach ($suppliers as &$row)
|
||||
$row['image'] = (!file_exists(_PS_SUPP_IMG_DIR_.'/'.$row['id_supplier'].'-medium_default.jpg')) ? $this->context->language->iso_code.'-default' : $row['id_supplier'];
|
||||
$row['image'] = (!file_exists(_PS_SUPP_IMG_DIR_.'/'.$row['id_supplier'].'-'.ImageType::getFormatedName('medium').'.jpg')) ? $this->context->language->iso_code.'-default' : $row['id_supplier'];
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'pages_nb' => ceil($nbProducts / (int)$this->n),
|
||||
'nbSuppliers' => $nbProducts,
|
||||
'mediumSize' => Image::getSize('medium_default'),
|
||||
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
|
||||
'suppliers_list' => $suppliers,
|
||||
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user