| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
display the total weight on the view cart page | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Re: display the total weight on the view cart page
Quote:
In /shipping/shipping.php, add: Code:
Code:
Then, to call this simply edit /skin1/customer/main/cart_totals.tpl and place this wherever you want to show it: Code:
|
|||||||
#12
|
|||||||
|
|||||||
Re: display the total weight on the view cart page
Nice one. For anyone intrested in layout I added this to skin1/main.css
Code:
and used it this way in cart_totals.tpl (around line 191) Code:
the"g" is for grams BTW since I was too lazy to edit languages and put in a nice label, although I did for lbl_totalwt which you can do or just type in the text you want. Vixnfox
__________________
V 4.3.1 Live: Developing on PHP 5.3.0 MySQL server 5.0.75-community-log MySQL client 5.1.36 Web server Apache/2.2.11 (Unix) mod_ssl/2.2.11 Windows 7 64bit on a Toshiba Satellite P500 ADELAIDE, SOUTH AUSTRALIA |
|||||||
#13
|
|||||||
|
|||||||
Re: display the total weight on the view cart page
Hey vixnfox,
I didn't even add anything to the CSS layout. I just added this: Code:
|
|||||||
#14
|
|||||||||
|
|||||||||
Re: display the total weight on the view cart page
Any idea on how this can be achieved using XC v4.4.x?
Many Thanks
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#15
|
|||||||||
|
|||||||||
Re: display the total weight on the view cart page
Quote:
To do this in 4.4.x - follow the previous instructions for 4.3.x, but instead of: shipping/shipping.php you need to be in: include/func/func.shipping.php
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
#16
|
|||||||||
|
|||||||||
Re: display the total weight on the view cart page
Thanks to everyone who contributed to the solution. I made a couple slight changes to accomplish this in 4.5.x using One Page Checkout.
In /shipping/shipping.php add Code:
Code:
I called it on /skin/common_files/modules/One_Page_Checkout/Summary/cart_totals.tpl by just inserting a row where I wanted it to display. Code:
__________________
Business Edition 5.2.10 Gold Plus 4.6.1 |
|||||||||
|
#17
|
|||||||
|
|||||||
Re: display the total weight on the view cart page
I'm struggling to get this to work on version 4.5.1. The file which includes the PHP code to amend is actually include/func/func.shipping.php, and I have done the following:
PHP Code:
And on the cart.tpl I have included this: HTML Code:
However nothing shows up. Any thoughts?
__________________
Darren X-Cart Gold 4.3.1 |
|||||||
#18
|
|||||||||
|
|||||||||
Re: display the total weight on the view cart page
Are you wrapping your call in anything? If I take it out of the table, it does not display.
__________________
Business Edition 5.2.10 Gold Plus 4.6.1 |
|||||||||
#19
|
|||||||
|
|||||||
Re: display the total weight on the view cart page
Quote:
Do you mean the smarty code? I'm including it in the Cart template near the "Checkout" button at the moment, but my final intention is to do an if statement see if total weight is over 12, if not, then include a disabled Checkout button (since weight must be over 12 to proceed).
__________________
Darren X-Cart Gold 4.3.1 |
|||||||
#20
|
|||||||||
|
|||||||||
Re: display the total weight on the view cart page
My bad, I thought you wanted to display information. I did something a while back that disabled specific shipping options based on extra field values of cart contents, but I really don't remember the details. I'm sure I found the instructions on the forum, it may help point you in the right direction.
If your only requirement is order total must be over 12 lbs, you could just set the minimum value on shipping options at 12 lbs and change the error label to read something like "Your order must be at least ..." The customer would not be able to check proceed without selecting a shipping method. If you did that, you may want to include the weight in the cart display.
__________________
Business Edition 5.2.10 Gold Plus 4.6.1 |
|||||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|