Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / list a price for each item on the shopping cart content page

list a price for each item on the shopping cart content page

Locked

Started by hoang on 15 Apr 2010, 4:30 PM · Views: 2,075

Results 1 to 20 of 24
This thread is locked. New replies are disabled.
15 Apr 2010, 4:30 PM
#1
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #1 by hoang

Please help ASP :(

i have built a cart for restaurant with full function of order
ex: item + modifier (without $$$ and with $$$)

the problem is after customer select those modifier (both free and charge) it auto combinated modifier price and item price for one that makes customer confused about costing

i want to list seperate each item price and modifier price each line (detail) and given subttotal in the last line (on Your Shopping Cart Contents look like invoice)

any idea or suggestion will be appreciated

Best,

15 Apr 2010, 4:33 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #2 by kobra

i have built a cart for restaurant with full function of order
A link to this would assist illustrating what you are attempting

Place ONE space in your link to break it as in
http: //www.zen-cart.com/

Zen-Venom Get Bitten

15 Apr 2010, 4:40 PM
#3
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #3 by hoang

moment please i going to make a picture for .....

okay here picture if not enough info for you i'll send the tester login for you

15 Apr 2010, 4:54 PM
#4
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #4 by hoang

oops forget a link

http://phoquyenonline.com/
checkout on the menu at second item
and look over the 1st and 2nd dishes

thank you for your time

15 Apr 2010, 6:57 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #5 by kobra

i want to list seperate each item price and modifier price each line (detail) and given subttotal in the last line
As what you want is not part of the default ZenCart code - you would have to add all of it and a conditional for those where it is not required to the selection, calc and display - - not impossible but a bit involved to be covered and tested in a forum posting
How is your php skills?

Zen-Venom Get Bitten

15 Apr 2010, 7:16 PM
#6
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #6 by hoang

Just a little more than basic kobra

let's me start with tpl_shopping_cart_default.php and need your help

as ZC has the overide system so i copy this file from default style to custom style let's see how it work

ill post the code when i done

once again thank you very much for your time kobra ....

15 Apr 2010, 7:30 PM
#7
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #7 by hoang

in the file tpl_shopping_cart_default.php (after i copy into my custom style under template folder)

in line 115

<?php echo $product['productsPriceEach']; ?>

i replace with

<?php echo $currencies->display_price(zen_get_products_base_price($product['id']), zen_get_tax_rate($products[$i]['tax_class_id'])); ?>

and now in the your shopping cart content
with UnitPrice col it show the original price of this item

but next col [Total] it till combinated price with some attributes price

and i not find out how to show the price of each attributes (if it applies) too

any idea Kobra
Best,

15 Apr 2010, 7:36 PM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #8 by kobra

Have a look at /classes/shopping_cart.php and look for the variables for attribute prices

Zen-Venom Get Bitten

15 Apr 2010, 8:20 PM
#9
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #9 by hoang

couldn't find it yet
how about invoice.php some key seem to work ....

15 Apr 2010, 8:29 PM
#10
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #10 by hoang

i saw in line # 105 file tpl_shopping_cart_default.php

<?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?>

and i know i need to add about value of price unforturnatly, i dump i did not find out the variable of it

do you have any ideas kobra !!!

16 Apr 2010, 11:48 AM
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #11 by kobra

tpl's are mostly display - - find your variables in /classes/shopping_cart.php

Zen-Venom Get Bitten

16 Apr 2010, 1:17 PM
#12
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #12 by hoang

one again thank you very much for your time kobra

i found a variable for attributes price and with the template file tpl_shopping_cart_default.php at line 98

<li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>

add the end a variable of attributes price
like

<li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?><?php echo TEXT_OPTION_DIVIDER . $value['options_values_price']; ?></li>

it show the price for each attributes (if it applies) but
i got the other problem that the number of price show more two 00 at the end
look attachment

any idea how to get off tow 00 on the attributes price col.
Best,

16 Apr 2010, 2:02 PM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #13 by kobra

I see this once in the cart

    * Add - Large Beef Soup - $2
    * Add - Rare Slice Beef - $1.25

Zen-Venom Get Bitten

16 Apr 2010, 2:18 PM
#14
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #14 by hoang

yeah kobra
i just add the "+" before a variable of attribute price
thanks for your time kobra

 <?php echo TEXT_OPTION_DIVIDER . "($" . +($value['options_values_price']) . ")"; ?>

and it remove tow last digist of 00

wel .... if you don't mind can you help me one more thing kobra
right now the sales tax is $0.00
it doesn't add into the shopping cart (2nd step)

do you have any idea !!!!

16 Apr 2010, 2:28 PM
#15
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #15 by hoang

in admin page
i already set tax zone, tax rates, ....

but in the shopping cart processing is shown as $0.00

please help

Best Regard,

included attachment for review

16 Apr 2010, 2:51 PM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #16 by ajeh

Did you try to just use the function to format the price on the Attribute Value?

<li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?><?php echo TEXT_OPTION_DIVIDER . $currencies->format($value['options_values_price']); ?></li>

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 Apr 2010, 3:09 PM
#17
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #17 by hoang

oh wow .... thank you very much Ajeh

can you help me about sales tax problem Ajeh

i don't know what i am done but beside the configu in admin i didn't took anywhere else of code (oop accept the tpl_shopping_cart_default with 2 lines modified as above)

Best Regard,

16 Apr 2010, 3:55 PM
#18
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #18 by ajeh

For the Attributes to show tax where needed, you can use:

<li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?><?php echo TEXT_OPTION_DIVIDER . $currencies->display_price($value['options_values_price'], zen_products_lookup($product['id'], 'products_tax_class_id')); ?></li>

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 Apr 2010, 4:09 PM
#19
hoang avatar

hoang

New Zenner

Join Date:
Mar 2010
Posts:
50
Plugin Contributions:
0

Post #19 by hoang

thank you very much Ajeh

but my problem is on the check out step 2 and 3
the sales tax is $0.00 (no taxes calculate in order) (i did pic on post #15)
i already double check taxes config with (one by one)
https://www.zen-cart.com/tutorials/index.php?article=155
https://www.zen-cart.com/tutorials/index.php?article=76

unfoturenately, it won't fix
any extra help for me today Ajeh !!!!
Best,

16 Apr 2010, 5:03 PM
#20
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #20 by ajeh

Could you check that your tax is setup right and see what the Priority is set to and the tax rate itself ...

Also check the Zone Definition ... make sure you have added the Details ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!