[-] CORE : fixed bug #PSCFV-4754 Image sizes are the same for all shops and themes

This commit is contained in:
vAugagneur
2012-12-18 14:59:34 +01:00
parent c138e2dc5b
commit 17350c6149
19 changed files with 80 additions and 57 deletions
@@ -120,8 +120,8 @@ class BlockBestSellers extends Module
$this->smarty->assign(array(
'best_sellers' => $best_sellers,
'mediumSize' => Image::getSize('medium_default'),
'smallSize' => Image::getSize('small_default')
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
'smallSize' => Image::getSize(ImageType::getFormatedName('small'))
));
return $this->display(__FILE__, 'blockbestsellers.tpl');
}
@@ -158,7 +158,7 @@ class BlockBestSellers extends Module
$this->smarty->assign(array(
'best_sellers' => $best_sellers,
'homeSize' => Image::getSize('home_default')));
'homeSize' => Image::getSize(ImageType::getFormatedName('home'))));
return $this->display(__FILE__, 'blockbestsellers-home.tpl');
}
}
+1 -1
View File
@@ -3868,7 +3868,7 @@ class BlockLayered extends Module
$smarty->assign(
array(
'homeSize' => Image::getSize('home_default'),
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
'nb_products' => $nb_products,
'category' => (object)array('id' => Tools::getValue('id_category_layered', 1)),
'pages_nb' => (int)($pages_nb),
@@ -101,7 +101,7 @@ class BlockNewProducts extends Module
$this->smarty->assign(array(
'new_products' => $newProducts,
'mediumSize' => Image::getSize('medium_default'),
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
));
return $this->display(__FILE__, 'blocknewproducts.tpl');
+1 -1
View File
@@ -92,7 +92,7 @@ class BlockSpecials extends Module
$this->smarty->assign(array(
'special' => $special,
'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'], 2),
'mediumSize' => Image::getSize('medium_default'),
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
));
return $this->display(__FILE__, 'blockspecials.tpl');
+2 -2
View File
@@ -158,7 +158,7 @@ class CrossSelling extends Module
$taxCalc = Product::getTaxCalculationMethod();
foreach ($orderProducts AS &$orderProduct)
{
$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], 'medium_default');
$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium'));
$orderProduct['link'] = $this->context->link->getProductLink((int)$orderProduct['product_id'], $orderProduct['link_rewrite'], $orderProduct['category'], $orderProduct['ean13']);
if (Configuration::get('CROSSSELLING_DISPLAY_PRICE') AND ($taxCalc == 0 OR $taxCalc == 2))
$orderProduct['displayed_price'] = Product::getPriceStatic((int)$orderProduct['product_id'], true, NULL);
@@ -212,7 +212,7 @@ class CrossSelling extends Module
$taxCalc = Product::getTaxCalculationMethod();
foreach ($orderProducts AS &$orderProduct)
{
$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], 'medium_default');
$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium'));
$orderProduct['link'] = $this->context->link->getProductLink((int)$orderProduct['product_id'], $orderProduct['link_rewrite'], $orderProduct['category'], $orderProduct['ean13']);
if (Configuration::get('CROSSSELLING_DISPLAY_PRICE') AND ($taxCalc == 0 OR $taxCalc == 2))
$orderProduct['displayed_price'] = Product::getPriceStatic((int)$orderProduct['product_id'], true, NULL);
+1 -1
View File
@@ -108,7 +108,7 @@ class HomeFeatured extends Module
$this->smarty->assign(array(
'products' => $products,
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
'homeSize' => Image::getSize('home_default'),
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
));
return $this->display(__FILE__, 'homefeatured.tpl');
+2 -2
View File
@@ -710,7 +710,7 @@ class ProductComments extends Module
'logged' => (int)$this->context->customer->isLogged(true),
'allow_guests' => (int)Configuration::get('PRODUCT_COMMENTS_ALLOW_GUESTS'),
'productcomment_cover' => (int)Tools::getValue('id_product').'-'.(int)$image['id_image'],
'mediumSize' => Image::getSize('medium_default'),
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
'criterions' => ProductCommentCriterion::getByProduct((int)Tools::getValue('id_product'), $this->context->language->id),
'action_url' => '',
'averageTotal' => (int)$average['grade'],
@@ -752,7 +752,7 @@ class ProductComments extends Module
'id_product_comment_form' => (int)Tools::getValue('id_product'),
'secure_key' => $this->secure_key,
'productcomment_cover' => (int)Tools::getValue('id_product').'-'.(int)$image['id_image'],
'mediumSize' => Image::getSize('medium_default'),
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
'nbComments' => (int)ProductComment::getCommentNumber((int)Tools::getValue('id_product')),
'productcomments_controller_url' => $this->context->link->getModuleLink('productcomments'),
'productcomments_url_rewriting_activated' => Configuration::get('PS_REWRITING_SETTINGS', 0)