Jump to content

Costs php variable without currency


devbox

Recommended Posts

Hello,

 

In the block cart in the sidebar i would like to display the shipping only when the shipping is superior of "0"

So i need that :

 

1. shipping cost variable with only numerals

What is the variable to make something like this :

{*if $shipping_cost <= 0} style="display:none;"{/if*}

Here $shipping_cost include the currency so that doesn't work ...

 

2. update ajax script to display shipping cost when a shipping > 0 is selected

 

Could you give me the variable and the way to modify the ajax dynamical update.

 

Thanks

Link to comment
Share on other sites

Hi devbox,

 

See modules/blockcart/blockcart.php

 

Now go to line #47, you have php method right there called "smartyAssigns". Here you have variables assigned to .tpl. You can put new variables if you like.

 

If you don't know what variable shows you shipping cost just look at file: classes/Cart.php

 

Method: getOrderTotal()

 

If you want to access this variable via ajax and ajax-cart.js you must add this variable to blockcart-json.tpl

 

I hope i will give you a little help with these two small clues.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...