Post by OptimusM » Sun Mar 06, 2011 4:12 am

Since it is not possible to calculate shipping cost until the customer has proceeded to checkout and chosen a shipping option, I was wondering if it then is possible to instead add a field in the cart window, where it says Shipping rate: calculated on checkout?

Thank you in advance!

New member

Posts

Joined
Thu Mar 03, 2011 8:15 pm

Post by soyo » Sun Mar 06, 2011 5:30 am

Couldn't you just add this to your template?

<Example removed as an alternate placement is required...>

1.4.9.3
Last edited by soyo on Sun Mar 06, 2011 2:33 pm, edited 1 time in total.

1.4.9.4


New member

Posts

Joined
Wed Dec 29, 2010 12:45 am

Post by OptimusM » Sun Mar 06, 2011 8:31 am

Thank you for the help, I will add that field to the check-out page. But I was referring to the shopping cart module, which is located on the right or left. Anyone know how to add this?

New member

Posts

Joined
Thu Mar 03, 2011 8:15 pm

Post by soyo » Sun Mar 06, 2011 1:58 pm

Woops ok you meant the module...

Which is good, because I just noticed that the first code I gave you needs to be in a slightly different place, else it will be repeated with multiple items added to the cart... :-( So if you still plan to put something there I can check again for the more proper insertion point... but probably not necessary if you'll be showing it in the module...

Ok then how about changing line 42 in catalog/view/theme/default/template/module/cart.tpl... (and this one should work with multiple items btw)...

from:

Code: Select all

    <div style="padding-top:5px;text-align:center;clear:both;"><a href="<?php echo $view; ?>"><?php echo $text_view; ?></a> | <a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></div>
to:

Code: Select all

    <div style="padding-top:5px;text-align:center;clear:both;"><div style="font-size: .8em; text-align:center;"><p>(Shipping calculated at checkout)</p></div><a href="<?php echo $view; ?>"><?php echo $text_view; ?></a> | <a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></div>
Remember these are just quick thoughts I'm throwing out here, not fully tested solutions... so some massaging, trial and error is in order... ;-)

1.4.9.3

1.4.9.4


New member

Posts

Joined
Wed Dec 29, 2010 12:45 am

Post by i2Paq » Sun Mar 06, 2011 5:19 pm

Why would you suggest something that breaks the multi-lingual of OpenCart?

You automatically assume that he has only the English language in use.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by OptimusM » Sun Mar 06, 2011 9:15 pm

Thank you it works perfectly ! =)

New member

Posts

Joined
Thu Mar 03, 2011 8:15 pm

Post by soyo » Mon Mar 07, 2011 2:34 am

i2Paq wrote:Why would you suggest something that breaks the multi-lingual of OpenCart?

You automatically assume that he has only the English language in use.
Agreed. But I'm not suggesting a fix for the world of Open Cart, just trying to show OptimusM where his personal modification would go. As I stated in my previous message, this is just a quick thought to point him in the right direction, not a full-scale mod... so if he (or anyone else) is using multi-language, they would need to take that into account and modify it accordingly. Of course, if he's just using one language (english or otherwise), then his task is accomplished, albeit for his own personal situation.

In any case, your point is a good one - I will try to be more vigilant in my future responses... ;-)

1.4.9.4


New member

Posts

Joined
Wed Dec 29, 2010 12:45 am
Who is online

Users browsing this forum: No registered users and 84 guests