Forums / Setting Up Categories, Products, Attributes / Attribute price doesn't show in shopping cart

Attribute price doesn't show in shopping cart

Started by hedera on 2 Aug 2008, 11:59 PM · Views: 3,523

Results 1 to 10 of 10
2 Aug 2008, 11:59 PM
#1
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Attribute price doesn't show in shopping cart

I'm trying to set up a fixed-amount donation page, using attribute pricing on a single product. You can see the current version here:

http://www.liferingtest.com/index.php?main_page=product_info&cPath=4&products_id=21

The product, Lifering General Fund, is priced by attribute, has a price (on the product page) of zero, and "Product is free" is set to no.
Shipping is set up like this:

  • Shipping address is required (we'll need to send the receipt)
  • Special, product/download combo requires shipping address is checked
    The option name is General Fund Donation and is a dropdown. It has 3 possible attributes (donation sizes), $20, $50, and $100. This is all set up and working beautifully with one glaring exception: When I choose a donation amount and click on "add to cart", the cart shows the name of the donation, which includes the amount, but the cart total is ZERO. I'm sure this is something stupid. Here are the attribute values for the $20 level which is what I've been working with:

Option name: General Fund Donation
Option Value: $20
Sort order: 10

It also, of course, as $50 and $100 option values which I will correct when I get $20 working.

When I edit the $20 option value:
Price is $20.0000
Price Factor is 1.0000
Order is 10
all other values are zero or blank.
On the radio buttons:
Display purposes only: no
Attribute free when product is free: yes
Default attribute: no
Apply discounts: no
Include in base price when priced by attributes: yes
Attribute required for text: no

I just tried changing the "attribute free" button to no and it didn't help. I've almost got it, it's very frustrating...

hedera

Nature bats last.

3 Aug 2008, 3:53 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Attribute price doesn't show in shopping cart

Sounds like the Option Value name is $20 but you have no price in it ... or, did you inadvertantly put the price in as $20 rather than 20.00

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!

3 Aug 2008, 4:54 AM
#3
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Re: Attribute price doesn't show in shopping cart

I'm confused about how to enter the price. The price field in the Product page is 0.000. Here are the columns from the attribute display before I edit it:

#      name                  value   PrefPrice  PrefWt  sort  tot/disc  1time
5      General Fund Donation     $20   + 0.0000   + 0      10      $0.00 $0.00 

So price does seem to be zero. When I put just 20.00 in the Price box, in attributes, the display looks like this:

$20ATTRIBUTES_PRICE_DELIMITER_PREFIX+$20.00ATTRIBUTES_PRICE_DELIMITER_SUFFIX

So I tried making the price box value $20.00 and it displays correctly but price shows as 0. If 20.0000 is the correct way to enter the price, how do I make the ATTRIBUTES_PRICE_DELIMITER_PREFIX etc. go away??

hedera

Nature bats last.

3 Aug 2008, 1:38 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Attribute price doesn't show in shopping cart

It would appear that your language files may be out of date or missing definitions ...

What happens if you switch to Classic Template? Do these go away?

These are defined, for example for the product_info page:

/includes/languages/english/product_info.php

Line #42 : define('ATTRIBUTES_PRICE_DELIMITER_PREFIX', ' ( '); 

Each product type has them ...

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!

4 Aug 2008, 5:33 PM
#5
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Re: Attribute price doesn't show in shopping cart

Actually, I switched to the classic template and the problem still exists. However, I'll take a look at that language file and see if I can set a reasonable value in the variable. What should it contain??

hedera

Nature bats last.

4 Aug 2008, 5:44 PM
#6
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Re: Attribute price doesn't show in shopping cart

Um, never mind - I had a backleveled copy of the product_info.php file. That is now corrected, and the donation adds correctly to the cart, but the dropdown display looks like this:

$20 (+$20)

That's obviously the option name with the price in parens; is that the standard display? I was thinking it would just display "$20". Is there any way to make it do that or do I need to play with the option name?

hedera

Nature bats last.

4 Aug 2008, 8:16 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Attribute price doesn't show in shopping cart

Can you change the text on the Option Value so that the amount shows the amount and the Option Value name is something else?

Have a good day $20.00
Have a great week! $50.00
Have a wonderful year! $100.00

A little something to help $20.00
Feeling lucky $50.00
Really want to top the bank! $100.00

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!

4 Aug 2008, 10:54 PM
#8
hedera avatar

hedera

Zen Follower

Join Date:
Nov 2007
Posts:
128
Plugin Contributions:
0

Re: Attribute price doesn't show in shopping cart

I'm working on getting appropriate wording from my business partner, but those are good suggestions - if he doesn't have any better ideas I may use them!

hedera

Nature bats last.

16 Oct 2008, 5:36 PM
#9
logus avatar

logus

New Zenner

Join Date:
Jan 2008
Posts:
2
Plugin Contributions:
0

Re: Attribute price doesn't show in shopping cart

I was having the same problem, to hide price change in file includes/modules/attributes.php in line 118
//$new_attributes_price = zen_get_attributes_price_final($products_options->fields["products_attributes_id"], 1, '', 'false');

That's all

30 Jan 2010, 11:52 AM
#10
inosia avatar

inosia

New Zenner

Join Date:
Jan 2010
Posts:
16
Plugin Contributions:
0

Re: Attribute price doesn't show in shopping cart

I had the same problem: no price displaying in the Shopping Cart. After checking in Attributes Controller, I discovered that I had not entered a value in the **Price **field. Yes, I'd removed the **"+" **in the preceding field, but the **Price **field was empty. So, I entered the price (example 10.0000) and voila!... the price now displayed in the Shopping Cart.

To remove the amount in brackets on your Product Page example $10.00 (+($10.00), this solution posted by snapworks works like a charm:

go to includes/modules/attributes.php simply replace the code in line 158 as follows:-

Original code:
$products_options_display_price= ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] .

New code:
$products_options_display_price= '';

To see the original post, check out the thread titled **Attribute price without the (+$x.xx) **posted 13th December 2009 and scroll down for the post by snapworks.