Jump to content

[SOLVED]Cart


Recommended Posts

To remove shipping from the cart block, edit modules/blockcart/blockcart.tpl and {* comment out *} lines 93-95:

{l s='Shipping' mod='blockcart'}
{$shipping_cost}




To remove shipping from the shopping cart summary, edit shopping-cart.tpl in your theme's directory and {* comment out *} lines 111-130:

{if $shippingCost > 0}
   {if $use_taxes}
       {if $priceDisplay}

{l s='Total shipping (tax excl.):'}
{displayPrice price=$shippingCostTaxExc}

       {else}

{l s='Total shipping (tax incl.):'}
{displayPrice price=$shippingCost}

       {/if}
   {else}

{l s='Total shipping:'}
{displayPrice price=$shippingCostTaxExc}

   {/if}
{/if}



You'll need to remove the shipping information from all the email templates in the mails directory too.

Link to comment
Share on other sites

  • 3 weeks later...

That will be more difficult. You'll need to change line 59 of modules/blockcart/blockcart.php from:

'total' => Tools::displayPrice($params['cart']->getOrderTotal($usetax), $currency),



to:

'total' => Tools::displayPrice($params['cart']->getOrderTotal($usetax, 4), $currency),



I think that should get the total without shipping. Here's the different parameters you can use:

type = 1: only products
type = 2: only discounts
type = 3: both
type = 4: both but without shipping
type = 5: only shipping
type = 6: only wrapping
type = 7: only products without shipping

Link to comment
Share on other sites

No luck!

That's how it looks.

$smarty->assign(array(
           'products'=> $products,
           'customizedDatas' => Product::getAllCustomizedDatas(intval($params['cart']->id)),
           'CUSTOMIZE_FILE' => _CUSTOMIZE_FILE_,
           'CUSTOMIZE_TEXTFIELD' => _CUSTOMIZE_TEXTFIELD_,
           'discounts' => $params['cart']->getDiscounts(false, $usetax),
           'nb_total_products' =>$params['cart']->nbProducts(),
           'shipping_cost' => Tools::displayPrice($params['cart']->getOrderTotal($usetax, 5), $currency),
           'show_wrapping' => floatval($params['cart']->getOrderTotal($usetax, 6)) > 0 ? true : false,
           'wrapping_cost' => Tools::displayPrice($params['cart']->getOrderTotal($usetax, 6), $currency),
           'product_total' => Tools::displayPrice($params['cart']->getOrderTotal($usetax, 4), $currency),
           'total' => Tools::displayPrice($params['cart']->getOrderTotal($usetax, 4), $currency),  
           'id_carrier' => $params['cart']->id_carrier,
           'ajax_allowed' => intval(Configuration::get('PS_BLOCK_CART_AJAX')) == 1 ? true : false
       ));

Link to comment
Share on other sites

  • 10 months later...
  • 2 months later...

As far as I know, it should be as easy as editing themes//modules/blockcart/blockcart.tpl (copy modules/blockcart/blockcart.tpl if this file doesn't exist) to override the cart, then change line 68 from:

{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if}



to:

{*{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if}*}

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...