// BugFix : Problems with blockcart

This commit is contained in:
mDeflotte
2011-12-21 09:52:38 +00:00
parent 8f262c81e8
commit b67f8abe67
4 changed files with 11 additions and 6 deletions
-3
View File
@@ -644,9 +644,6 @@ class FrontControllerCore extends Controller
'priceDisplayPrecision' => _PS_PRICE_DISPLAY_PRECISION_,
'content_only' => (int)Tools::getValue('content_only')
));
}
public function initFooter()
+9 -1
View File
@@ -85,7 +85,15 @@ class LinkCore
$url .= $this->getLangLink($id_lang);
if (!is_object($product))
$product = new Product($product, false, $id_lang);
{
if (is_array($product) && isset($product['id_product']))
$product = new Product((int)$product['id_product'], false, $id_lang);
else if(is_numeric($product))
$product = new Product((int)$product, false, $id_lang);
else
throw new PrestashopException('Invalid product vars');
}
// Set available keywords
$params = array();
+1 -1
View File
@@ -39,7 +39,7 @@
#cart_block .quantity-formated {
display:inline-block;
margin-right:5px;
width:15px
min-width:18px;
}
#cart_block .cart_block_product_name {font-weight:bold}
#cart_block .remove_link {
+1 -1
View File
@@ -62,7 +62,7 @@ var removingLinkText = '{l s='remove this product from my cart' mod='blockcart'
{assign var='productAttributeId' value=$product.id_product_attribute}
<dt id="cart_block_product_{$product.id_product}{if $product.id_product_attribute}_{$product.id_product_attribute}{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">
<span class="quantity-formated"><span class="quantity">{$product.cart_quantity}</span>x</span>
<a class="cart_block_product_name" href="{$link->getProductLink($product)}" title="{$product.name|escape:html:'UTF-8'}">
<a class="cart_block_product_name" href="{$link->getProductLink($product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)}" title="{$product.name|escape:html:'UTF-8'}">
{$product.name|truncate:13:'...'|escape:html:'UTF-8'}</a>
<span class="remove_link">{if !isset($customizedDatas.$productId.$productAttributeId)}<a rel="nofollow" class="ajax_cart_block_remove_link" href="{$link->getPageLink('cart', true, NULL, "delete&amp;id_product={$product.id_product}&amp;ipa={$product.id_product_attribute}&amp;token={$static_token}")}" title="{l s='remove this product from my cart' mod='blockcart'}">&nbsp;</a>{/if}</span>
<span class="price">{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if}</span>