Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Setting Up Categories, Products, Attributes / Attribute listing price on shopping cart page

Attribute listing price on shopping cart page

12 Mar 2014, 5:01 PM
#1
k1ra avatar

k1ra

New Zenner

Join Date:
Jul 2013
Posts:
57
Plugin Contributions:
0

Post #1 by k1ra

I have a couple attribute challenges that are puzzling me:

  1. I have products with many attributes, some of which have a set price attached to it. ex.:

Imprint color - $65
eProof - -$50

When a product is added to the cart with these attributes selected, they are not itemized in the shopping cart page. The prices and attributes are listed, but not together. Is there a way to list this in the cart as:

Product A - $100
Imprint Color - $65
eProof - $50

Instead of

Product A - $100
- $65
- $50
Imprint Color
eProof

12 Mar 2014, 6:39 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #2 by stevesh

Sounds like a styling thing. A link to your site would help.

14 Mar 2014, 2:13 PM
#3
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Post #3 by twitchtoo

Yes, you need to add the variables to the stock shopping cart page, so they can be displayed.

I did it with Twitch Wholesale + Attributes. Download it from the forum and scoop the 'core charge' attribute code from the shopping_cart pages, don't forget to check the variables are being passed in the modules/pages/product_info and modules/pages/shopping_cart - header_php.php and main_template_vars.php

Basically the attribute variable gets passed to the shopping cart page, just never gets called to be displayed. Call it on the shopping cart page, and it will pop up like that!

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

14 Mar 2014, 8:31 PM
#4
k1ra avatar

k1ra

New Zenner

Join Date:
Jul 2013
Posts:
57
Plugin Contributions:
0

Post #4 by k1ra

I'll try to get a live dev site up this evening..

So If I'm understanding correctly, I download the plugin and copy part of the code from the shopping_cart pages and from /modules/pages/product_info/header_php.php and includes/modules/pages/shopping_cart/main_template_vars.php?

19 Sep 2014, 9:59 PM
#5
hurlingguano avatar

hurlingguano

New Zenner

Join Date:
Nov 2012
Posts:
9
Plugin Contributions:
0

Post #5 by hurlingguano

twitchtoo:

Yes, you need to add the variables to the stock shopping cart page, so they can be displayed.

I did it with Twitch Wholesale + Attributes. Download it from the forum and scoop the 'core charge' attribute code from the shopping_cart pages, don't forget to check the variables are being passed in the modules/pages/product_info and modules/pages/shopping_cart - header_php.php and main_template_vars.php

Basically the attribute variable gets passed to the shopping cart page, just never gets called to be displayed. Call it on the shopping cart page, and it will pop up like that!

I get the impression (and trust me - I am NOT a php wizard) that this will provide the Attribute Price if it's entered as a normal factor - it will be multiplied by the number selected in the quantity box. I don't suppose you've already coded this for One-Time Priced Attributes as well?

I have a client using a Document Product to register people for an Annual Conference. We are then using One-Time Priced Attributes to provide multiple options on events (e.g. 4 Members Registering; 1 for Golf at $175 or 2 for Golf at $350, or 3 ...). Since there are multiple options of Events that multiple numbers of people may select from a given "party," we've used One-Time pricing.

The reason for the itemized line-item is in the Shopping Cart and eMail Confirmations - it's confusing to the member when all of the one-time charges are subtotaled. If we simply put a price in the Attribute's Option Value, it looks like hell on the order-screen.

Thoughts?

Thanking you in advance,

20 Sep 2014, 1:50 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #6 by mc12345678

HurlingGuano:

I get the impression (and trust me - I am NOT a php wizard) that this will provide the Attribute Price if it's entered as a normal factor - it will be multiplied by the number selected in the quantity box. I don't suppose you've already coded this for One-Time Priced Attributes as well?

I have a client using a Document Product to register people for an Annual Conference. We are then using One-Time Priced Attributes to provide multiple options on events (e.g. 4 Members Registering; 1 for Golf at $175 or 2 for Golf at $350, or 3 ...). Since there are multiple options of Events that multiple numbers of people may select from a given "party," we've used One-Time pricing.

The reason for the itemized line-item is in the Shopping Cart and eMail Confirmations - it's confusing to the member when all of the one-time charges are subtotaled. If we simply put a price in the Attribute's Option Value, it looks like hell on the order-screen.

Thoughts?

Thanking you in advance,

So the comment made by stevesh was that the fact that the price/info shows means that in fact it is there but not presented properly. His followon statement/request was to see the page. Knowing his previous support, the goal was to then load the page and he would provide suggestions on how to correct the misplacement. If your site also looks jumbled, then I would suggest the same thing, provide some semblance of a link to the site, preferably the problem location (though in this case would have to probably create an account and move through) and then very detailed assistance can be provided. There is no reason to add more software to correct a situation that more than likely was caused by the template to begin with. (Ie, also try the default template and see how things look.)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Sep 2014, 5:45 PM
#7
hurlingguano avatar

hurlingguano

New Zenner

Join Date:
Nov 2012
Posts:
9
Plugin Contributions:
0

Post #7 by hurlingguano

mc12345678:

So the comment made by stevesh was that the fact that the price/info shows means that in fact it is there but not presented properly. His followon statement/request was to see the page. Knowing his previous support, the goal was to then load the page and he would provide suggestions on how to correct the misplacement. If your site also looks jumbled, then I would suggest the same thing, provide some semblance of a link to the site, preferably the problem location (though in this case would have to probably create an account and move through) and then very detailed assistance can be provided. There is no reason to add more software to correct a situation that more than likely was caused by the template to begin with. (Ie, also try the default template and see how things look.)

I generally agree, but I believe I am using the default template for the shopping cart. And, it's not really "jumbled," just not displaying the line-item price, for a One-Time Attribute (see below):

Attachment 14533

The first highlight is the Subtotaled, One-time Attribute prices. The subsequent, blank highlights are where it would be helpful to have them.

If I kludge it and put the prices in the Option Value, I would end up cluttering the actual Document Product screen:

Attachment 14534

The site and specifically this page is at: http://www.texasseedtrade.com/index.php?main_page=document_product_info&cPath=9&products_id=42

I would also prefer not to change code, but I can't seem to find anywhere in the Configurations that will allow me to "turn this on." And, my impression from looking at Twitch's (very nice, I might add) suggestion is that his code works with the regular pricing factors, but not necessarily with the One-Time price on Attributes. And, I could also be wrong.

20 Sep 2014, 8:30 PM
#9
hurlingguano avatar

hurlingguano

New Zenner

Join Date:
Nov 2012
Posts:
9
Plugin Contributions:
0

Post #9 by hurlingguano

stevesh:

You're using the Bradford Pure template, which is one of Anne's. Try looking through and then posting if necessary in the template support thread here: http://www.zen-cart.com/showthread.php?201489-Bradford-Pure-Template-Support-Thread

I went back through the Bradford Pure support site, and there are no references to the issue, and the (apparently) pertinent files:

  • /includes/classes/order.php
  • /includes/classes/order_total.php
  • /includes/templates/template_default/templates/tpl_shopping_cart_default.php

are all the standard Zen-Cart files (I did do a compare to make sure).

Other thoughts, or do I just need to call the variables in the /includes/templates/template_default/templates/tpl_shopping_cart_default.php to include the One Time Price on each Attribute line (?)

20 Sep 2014, 11:19 PM
#10
hurlingguano avatar

hurlingguano

New Zenner

Join Date:
Nov 2012
Posts:
9
Plugin Contributions:
0

Post #10 by hurlingguano

UPDATE:

What I apparently need to know is how to put the correct variable into the table in

/includes/templates/template_default/templates/tpl_shopping_cart_default.php, at approximately Line 98.

I've played with it, but my understanding of both Zen-Cart and php is insufficient to pull the Numeric/Dollar value for the attribute_price_onetime_charges (I'm also unsure if that variable gets changed to "onetime_charges" in includes/classes/orders.php or anywhere else).

Echoing it on the same line, in the same <td> as the products_options_name and products_options_values_name would be sufficient. Ideally, it would be nice to have it show up in the next <td>, but I'm not sure if that would require a ton of extra coding to make it line up.

Is there something simple that can be done to accomplish this?

Thanks to all who have helped - I do appreciate both the assist and the patience.

20 Sep 2014, 11:30 PM
#11
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #11 by mc12345678

The information would be pulled in through acombination of files in the includes/modules/pages/shopping_cart folder. Header_php.php, main_template_variables.php.

Data needs to be pulled from the database, filtered associated to your product(s) and then captured as the variable(s) you want, lastly captured on the template file...

There are a lot of standard functions that can get the associated data. Decent documentation to find the function(s) can be found at one of the links at the bottom of https://www.zen-cart.com/docs yes it says documentation for 1.5.0; however, relatively the same still to 1.5.1.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Sep 2014, 11:36 PM
#12
hurlingguano avatar

hurlingguano

New Zenner

Join Date:
Nov 2012
Posts:
9
Plugin Contributions:
0

Post #12 by hurlingguano

Thank you - I appreciate that. I will go get after it.

Y'all have a great rest-of-the-weekend!

mc12345678:

The information would be pulled in through acombination of files in the includes/modules/pages/shopping_cart folder. Header_php.php, main_template_variables.php.

Data needs to be pulled from the database, filtered associated to your product(s) and then captured as the variable(s) you want, lastly captured on the template file...

There are a lot of standard functions that can get the associated data. Decent documentation to find the function(s) can be found at one of the links at the bottom of https://www.zen-cart.com/docs yes it says documentation for 1.5.0; however, relatively the same still to 1.5.1.