Jump to content
sembrouille

Shipping in cart

Recommended Posts

hi

 

i am trying to use your contrib http://addons.oscommerce.com/info/8422.

 

tax/VAT is not being added to the total.Also it doesnt display vat in the shopping cart.

 

If you can please help or point me which file i need to be looking at i would appreciate it very much.

 

thanks

 

nafri

Share this post


Link to post
Share on other sites

Hi

 

Very good contribution, I use it :).

 

1) /catalog/includes/fdp_panier.php

 

FIND (at the end of file) :

 

<!-- soustotal fdp total -->

<p align="left" class="msgfdpgratuitPanier"><?php echo $text_fdp_scart; ?></p>

 

<p align="right" class="prixTotauxPanier"><?php if ($order->customer['country']['id'] == '') { echo TEXT_DELIVRY_STATE . tep_draw_pull_down_menu('countrieselected', $countries_array, $menu_default_countrie, 'width="230" style="width: 230px" onChange="this.form.submit();"') . tep_draw_separator('pixel_trans.gif', '100%', '5'); } ?></p>

 

<p align="right" class="prixTotauxPanier"><?php if (sizeof($quotes_array) > 1) { echo TEXT_DELIVRY_TRANSPORTEUR . tep_draw_pull_down_menu('shippingselected', $quotes_array, $default_shipping_module, 'width="230" style="width: 230px" onChange="this.form.submit();"') . tep_draw_separator('pixel_trans.gif', '100%', '5'); } ?></p>

 

<p align="right" class="prixTotauxPanier"><?php if ($erreur_shipping != '') { echo $erreur_shipping; } elseif ($default_quotes_array != '') { echo ucfirst($titre_shipping); echo ' : ' . $currencies->display_price((float)$calcul_fdp_scart, $tax_fdp, 1) . tep_draw_separator('pixel_trans.gif', '100%', '5'); } ?></p>

 

<p align="right" class="prixTotauxPanier"><?php echo SUB_TITLE_SUB_TOTAL; echo $currencies->format($cart->show_total()) . tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></p>

 

<p align="right" class="prixST"><?php echo SUB_TITLE_TOTAL; echo $currencies->format(($cart->show_total()) + tep_add_tax((float)$calcul_fdp_scart, $tax_fdp)); ?></p>

 

<!-- fin soustotal fdp total -->

<!-- //############ Fin Frais de port dans le panier by Brouillard s'embrouille ############-->

 

 

REPLACE :

 

<!-- soustotal fdp total -->

<p align="left" class="msgfdpgratuitPanier"><?php echo $text_fdp_scart; ?></p>

 

<p align="right" class="prixTotauxPanier"><?php if ($order->customer['country']['id'] == '') { echo TEXT_DELIVRY_STATE . tep_draw_pull_down_menu('countrieselected', $countries_array, $menu_default_countrie, 'width="230" style="width: 230px" onChange="this.form.submit();"') . tep_draw_separator('pixel_trans.gif', '100%', '5'); } ?></p>

 

<p align="right" class="prixTotauxPanier"><?php if (sizeof($quotes_array) > 1) { echo TEXT_DELIVRY_TRANSPORTEUR . tep_draw_pull_down_menu('shippingselected', $quotes_array, $default_shipping_module, 'width="230" style="width: 230px" onChange="this.form.submit();"') . tep_draw_separator('pixel_trans.gif', '100%', '5'); } ?></p>

 

<p align="right" class="prixTotauxPanier"><?php if ($erreur_shipping != '') { echo $erreur_shipping; } elseif ($default_quotes_array != '') { echo ucfirst($titre_shipping); echo ' : ' . $currencies->format(((float)$calcul_fdp_scart + tep_calculate_tax((float)$calcul_fdp_scart, $tax_fdp))) . tep_draw_separator('pixel_trans.gif', '100%', '5'); } ?></p>

 

<p align="right" class="prixTotauxPanier"><?php echo SUB_TITLE_SUB_TOTAL; echo $currencies->format($cart->show_total()) . tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></p>

 

<p align="right" class="prixST"><?php echo SUB_TITLE_TOTAL; echo $currencies->format(($cart->show_total()) + ((float)$calcul_fdp_scart + tep_calculate_tax((float)$calcul_fdp_scart, $tax_fdp))) ;?></p>

 

<!-- fin soustotal fdp total -->

<!-- //############ Fin Frais de port dans le panier by Brouillard s'embrouille ############-->

Share this post


Link to post
Share on other sites

Hi

 

it is a very good contribution, and many thanks for your help.

 

The change adds tax to the shipping .

what is was looking for was somehing like this

 

Product cost (ex tax)

Shipping cost (ex tax)

Subtotal (ex tax)

Tax

Total including tax.

 

What i have right now is

 

 

Product cost (ex tax)

Shipping cost (with tax)

Subtotal (ex tax)

Total (ex tax).

 

 

i am missing total tax and final total to include tax.

Share this post


Link to post
Share on other sites

"tax/VAT is not being added to the total. Also it doesnt display vat in the shopping cart."

 

You want to show the tax : (the rate of the tax) with the price or the description (20% tax) ?

 

Note: there are two taxes (product tax and shipping tax)

 

Share this post


Link to post
Share on other sites

hi

 

i made the changes above...but it adds tax to shipping..

 

i want to show the total tax with discription as it shows in checkout _confirmation.. The total tax is (product tax and shipping tax). final total will then include sum of all..

 

for example like this

 

product :£29.99

 

Sub-Total:£29.99

 

Flat Rate (Best Way):£5.00

 

Vat 20%:£7.00

 

Total:£41.99

Share this post


Link to post
Share on other sites

like that ? :

 

<!-- soustotal fdp total -->

<p align="left" class="msgfdpgratuitPanier"><?php echo $text_fdp_scart; ?></p>

 

<p align="right" class="prixTotauxPanier"><?php if ($order->customer['country']['id'] == '') { echo TEXT_DELIVRY_STATE . tep_draw_pull_down_menu('countrieselected', $countries_array, $menu_default_countrie, 'width="230" style="width: 230px" onChange="this.form.submit();"') . tep_draw_separator('pixel_trans.gif', '100%', '5'); } ?></p>

 

<p align="right" class="prixTotauxPanier"><?php if (sizeof($quotes_array) > 1) { echo TEXT_DELIVRY_TRANSPORTEUR . tep_draw_pull_down_menu('shippingselected', $quotes_array, $default_shipping_module, 'width="230" style="width: 230px" onChange="this.form.submit();"') . tep_draw_separator('pixel_trans.gif', '100%', '5'); } ?></p>

 

<p align="right" class="prixTotauxPanier"><?php if ($erreur_shipping != '') { echo $erreur_shipping; } elseif ($default_quotes_array != '') { echo ucfirst($titre_shipping); echo ' : ' . $currencies->format(((float)$calcul_fdp_scart + tep_calculate_tax((float)$calcul_fdp_scart, 0))) . tep_draw_separator('pixel_trans.gif', '100%', '5'); } ?></p>

 

<p align="right" class="prixTotauxPanier"><?php echo TITLE_SHIPPING_INCLUDE_TAX . ' : (' . $tax_fdp . '%) ' . $currencies->format((tep_calculate_tax((float)$calcul_fdp_scart, $tax_fdp)));?></p>

 

<p align="right" class="prixTotauxPanier"><?php echo SUB_TITLE_SUB_TOTAL; echo $currencies->format($cart->show_total()) . tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></p>

 

 

<p align="right" class="prixST"><?php echo SUB_TITLE_TOTAL; echo $currencies->format(($cart->show_total()) + ((float)$calcul_fdp_scart + tep_calculate_tax((float)$calcul_fdp_scart, $tax_fdp))) ;?></p>

 

<!-- fin soustotal fdp total -->

<!-- //############ Fin Frais de port dans le panier by Brouillard s'embrouille ############-->

 

Share this post


Link to post
Share on other sites

hi mate

 

many thanks for helping me here.I think there is still a small issue..

 

With your last change i am getting this (after changing order of few lines)

 

Sub-Total:£29.99

Flat Rate (Best Way) : £5.00

 

TITLE_SHIPPING_INCLUDE_TAX : (20%) £1.00

Total:£35.99

 

I should be getting

 

 

Sub-Total:£29.99

Flat Rate (Best Way):£5.00

TITLE_SHIPPING_INCLUDE_TAX : (20%) :£7.00

Total:£41.99

 

TITLE_SHIPPING_INCLUDE_TAX must include (tax of shiiping +tax of product)

 

Total must be (subtotal+shipping+tax)

Edited by nafri

Share this post


Link to post
Share on other sites

Very useful contribution, I just have one small problem.

 

The text that displays how much more money you need to spend for free shipping always has £0.00 at the end.

I wanted to remove it but no luck, would really appreciate if someone can help me to remove the £0.00.

 

Thanks


Find this post helpful? Click the 'Like this' button. :)

Share this post


Link to post
Share on other sites

Hi,

 

 

 

Box Shopping:

in /includes/functions/general.php

 

Find:

 

$text_fdp_sboxe = '<span class=msgfdpgratuit>' . sprintf(TEXT_REST_FREE_SHIPPING, $currencies->format($fdp_reste_sboxe)) . ' ' . $currencies->format(0) .'</span>';

 

 

Replace:

 

$text_fdp_sboxe = '<span class=msgfdpgratuit>' . sprintf(TEXT_REST_FREE_SHIPPING, $currencies->format($fdp_reste_sboxe)) .'</span>';

 

 

For the text:

 

in /includes/languages/english.php

 

You can change the text in:

define('TEXT_REST_FREE_SHIPPING', 'The text that you like ...');

 

************************************************** ***********************

 

Shopping cart:

 

in /includes/fdp_panier.php

 

Find:

$text_fdp_scart = sprintf(TEXT_REST_FREE_SHIPPING, $currencies->format($fdp_gratuit_scart)) . ' ' . $currencies->format(0);

 

 

Replace :

 

$text_fdp_scart = sprintf(TEXT_REST_FREE_SHIPPING, $currencies->format($fdp_gratuit_scart));

 

 

For the text:

 

in /includes/languages/english.php/shopping_cart.php

 

You can change the text in:

define('TEXT_REST_FREE_SHIPPING', 'The text that you like ...');

 

Share this post


Link to post
Share on other sites

Thanks, that's what I wanted.


Find this post helpful? Click the 'Like this' button. :)

Share this post


Link to post
Share on other sites

I had a problem with this addon, in that shipping costs were being added to virtual products. I dont know if you were aware of this bug or not.

 

I amended the code in the shopping_cart.php file so that it looked like

 

<?php

if ($cart->show_weight()== 0) {

echo '<p align="right"><strong>' . SUB_TITLE_SUB_TOTAL . $currencies->format($cart->show_total()) . '</strong></p>';

} else {

include(DIR_WS_INCLUDES . 'fdp_panier.php');

}

?>

 

This made this addon work for me.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

hi!

thank you very much for your great contribution!

I've a little problem that I can't understand how to resolve.

 

The total cost it's regulary calculated, but it show a wrong shipping cost, actually it always show a cost of 21€....

 

for example, with real shipping cost of 10 euros, it show me:

 

shipping cost: € 21

sub-total: € 100

total: € 110

 

do you have any idea? where I'm wrong?

thank you very much

Riccardo

Share this post


Link to post
Share on other sites

How do I get Sales tax to show in the cart? I don't need shipping tax!!!! a little help anyone? or is there a different add on I should use?

Share this post


Link to post
Share on other sites

Are there any pre-requisites for using this contrib?

 

For example, when users select their country and mode of transport, where does it get the costs from?

 

Do I firstly have to set up shipping zone rates to specifiy this?

 

Sorry if this is a silly question, I'm very new to all this.

Share this post


Link to post
Share on other sites

Thanks, yes that did help, I think I have it all working now.

 

Does anybody know how to change the dropdown menu to show a specific country as the default?

 

I have managed to achieve this for the other dropdown menus on my site by editing the includes/functions/html_output.php

From this:

 

function tep_get_country_list($name, $selected = '', $parameters = '') {

$countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));

 

To this:

 

function tep_get_country_list($name, $selected = '222', $parameters = '') {

$countries_array = array(array('id' => '222', 'text' => 'United Kingdom'));

 

But it didn't affect this one?

Share this post


Link to post
Share on other sites

I have this installed and love it.

 

Is there any way to get the shipping costs to show in the dropdown, rather than when the page refreshes after selecting a shipping method.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

I have this installed and love it.

 

Is there any way to get the shipping costs to show in the dropdown, rather than when the page refreshes after selecting a shipping method.

 

Hi Steve

 

I'm not sure if this is what you mean but.....

 

Around line 109 find //------------------- fin affiche fdp ---------------------------------------------------- , count up two closing curly wurlies and add the line shown - that should get you the dropdown displaying 'Royal Mail (£12.87)' instead of 'Royal Mail'

 

//altering dropdown text
$quotes_array[$i]['text'].= ' ('.$currencies->format( tep_add_tax((float)$calcul_fdp_scart, $tax_fdp)).')';
//end
}
}
//------------------- fin affiche fdp ----------------------------------------------------

 

p.s. first I've seen this one and it's a much nicer add-on than the older ship in cart contribution - well done MrFoggy

Edited by Bob Terveuren

Share this post


Link to post
Share on other sites

Can someone tell me if this item supports zip/postal code lookup for US to US shipping? I am using the USPS and UPS add ons for shipping, my site is 2.3.3

Share this post


Link to post
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

×