Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Option Prices in Parentheses

Option Prices in Parentheses

Locked

Views: 5,559

Results 1 to 20 of 25
This thread is locked. New replies are disabled.
17 May 2006, 4:30 PM
#1
jplanet avatar

jplanet

New Zenner

Join Date:
Apr 2006
Posts:
46
Plugin Contributions:
0

Option Prices in Parentheses

I have a gift certificate that is priced by options. When I add the price to each item in the drop-down, the price shows in parentheses next to it, but it is redundant (the options are named $10,$15, etc.). Is there a way to hide the price from showing in parenthese?

Example here (I've only added the price to the first option until I get it solved):

http://www.readandclick.com/store/index.php?main_page=product_info&cPath=8&products_id=51

18 May 2006, 7:03 AM
#2
festus avatar

festus

Totally Zenned

Join Date:
Sep 2004
Location:
Near Barbeque
Posts:
1,067
Plugin Contributions:
0

Re: Option Prices in Parentheses

Make it say TEN, FIFTEEN, TWENTY, TWENTY FIVE, etc.

Now it's not redundant. :laugh:

18 May 2006, 4:45 PM
#3
jplanet avatar

jplanet

New Zenner

Join Date:
Apr 2006
Posts:
46
Plugin Contributions:
0

Re: Option Prices in Parentheses

LOL, brilliant!

25 May 2006, 11:18 PM
#5
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,611
Plugin Contributions:
0

Re: Option Prices in Parentheses

If you are using 1.3+ then the attributes module is overridable, find the section that ouputs the amount and remove the parts that define the variable. There are 2 places if I remember correctly.

NOTE: If you have other products that are priced by attributes it will remove the additional prices too.

BTW- your Gift Certificates say starting at $11.00- if you are pricing by attribute then you want to make the base price 0 instead of $1.

25 May 2006, 11:27 PM
#6
jplanet avatar

jplanet

New Zenner

Join Date:
Apr 2006
Posts:
46
Plugin Contributions:
0

Re: Option Prices in Parentheses

Kim:

If you are using 1.3+ then the attributes module is overridable, find the section that ouputs the amount and remove the parts that define the variable. There are 2 places if I remember correctly.

NOTE: If you have other products that are priced by attributes it will remove the additional prices too.

BTW- your Gift Certificates say starting at $11.00- if you are pricing by attribute then you want to make the base price 0 instead of $1.

Thanks for your reply Kim, I do have 1.3.0.1, so I will try to find the file. It will be safe to override, as the only other products are books, and they will never have any options...I thought I found the file before, but it was very dense code, and I had a lot of trouble trying to locate where that price is output...I could certainly find nothing that concatenated anything with parnethes, after trying a site-wide search for: .")"

The client wants to charge $1 to ship the paper gift certificate, but there is no way to override the shipping rules for the books for this one item...unless you can suggest another way! My boss would be very happy if I could clear that up...

Cheers,

John

25 Jun 2006, 2:22 PM
#7
amandac avatar

amandac

New Zenner

Join Date:
May 2005
Posts:
15
Plugin Contributions:
0

Re: Option Prices in Parentheses

Could somebody post the lines I need to alter to get rid of the price in the options dropdown box?

I've managed to get rid of the weight/shipping dropdown but would also like the price to go away. LOL

Thanks ;-)
Amanda

25 Jun 2006, 3:14 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Option Prices in Parentheses

If I were to buy something ... and there was a price on what I am buying ... I would want to see the price and not be surprised later ...

How are you setting up the prices that you do not want to see the Price on the attributes?

The weights can just be turned off with a switch ...

Catalog ... Product Type ... Edit Layout

Show Attribute Weight
Display Attribute Weight on Product Info 0= off 1= on

25 Jun 2006, 3:51 PM
#9
jplanet avatar

jplanet

New Zenner

Join Date:
Apr 2006
Posts:
46
Plugin Contributions:
0

Re: Option Prices in Parentheses

Ajeh:

If I were to buy something ... and there was a price on what I am buying ... I would want to see the price and not be surprised later ...

How are you setting up the prices that you do not want to see the Price on the attributes?

See how I'm using attributes here to select the amount of a Gift Certificate:
http://readandclick.com/store/index.php?main_page=product_info&cPath=8&products_id=54

The price IS the option...so it looks rather silly having the price, then again in parentheses...

25 Jun 2006, 5:27 PM
#10
amandac avatar

amandac

New Zenner

Join Date:
May 2005
Posts:
15
Plugin Contributions:
0

Re: Option Prices in Parentheses

The price WILL be included in the option name. We just want to choose how it's displayed. I would rather the option text show the total amount (product price + option value).

Nothing shiesty going on as far as not allowing the customer to know what they're paying. LOL I just have a preference as to how it's displayed.

25 Jun 2006, 5:27 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: Option Prices in Parentheses

You might consider making the Physical Gift Certificate a Document Product so that you can customize the code easier on the Attributes based on the products_type ...

Otherwise, when you later want to use Attributes with prices etc. you will not have them there ...

25 Jun 2006, 5:37 PM
#12
jplanet avatar

jplanet

New Zenner

Join Date:
Apr 2006
Posts:
46
Plugin Contributions:
0

Re: Option Prices in Parentheses

Seems like so much work for a very simple feature...I had a hard time explaining to my boss that I would need to set aside an entire aftrenoon to remove the parentheses...It's a good thing she trusts me! But sometimes issues like this put a strain on that trust...

25 Jun 2006, 5:39 PM
#13
amandac avatar

amandac

New Zenner

Join Date:
May 2005
Posts:
15
Plugin Contributions:
0

Re: Option Prices in Parentheses

OK I fixed mine.

This is only for the dropdown box display.

includes/modules/attributes.php

Comment out lines 153 - 158.

// normal price
// if ($new_attributes_price == 0) {
// $products_options_display_price= '';
// } else {
// $products_options_display_price= ' (' . $products_options->fields['price_prefix'] .
// $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ') ';
// }

Did the trick for me :-)

25 Jun 2006, 5:49 PM
#14
ajeh avatar

ajeh

Oba-san

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

Re: Option Prices in Parentheses

Well the first part on the weight is just a switch ...

The Price on Dropdowns gets built and is set at around line 165 in the attributes.php

                  $products_options_array[sizeof($products_options_array)-1]['text'] .= 'I AM HERE' . $products_options_display_price;

Change your line to read that and you can see what all is effected by that line ...

Then set your condition for when it should and should not show the price ...

25 Jun 2006, 5:57 PM
#15
jplanet avatar

jplanet

New Zenner

Join Date:
Apr 2006
Posts:
46
Plugin Contributions:
0

Re: Option Prices in Parentheses

Ajeh:

Well the first part on the weight is just a switch ...

The Price on Dropdowns gets built and is set at around line 165 in the attributes.php

              $products_options_array[sizeof($products_options_array)-1]['text'] .= 'I AM HERE' . $products_options_display_price;
> 
> Change your line to read that and you can see what all is effected by that line ...
> 
> Then set your condition for when it should and should not show the price ...

VERY interesting -- is there a way to do this with overrides so that it won't be affected by an upgrade?
25 Jun 2006, 8:36 PM
#16
ajeh avatar

ajeh

Oba-san

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

Re: Option Prices in Parentheses

That is an override using:

/includes/modules/attributes.php

And going to:
/includes/modules/your_template_dir/attributes.php

However, that has to be checked on upgrades for changes to the original file to see what has to be upgraded on your file ...

13 Jul 2006, 1:23 PM
#18
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Option Prices in Parentheses

[update] - Sorry you meant the whole parenthese - not just the parenthese to be removed.

I'm really not an an attributer specialist but let's try this out.

Under your includes/modules/attributes.php file,

find:

$products_options_display_price= ' (' . $products_options->fields['price_prefix'] .
                      $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ') ';

replace with:

$products_options_display_price= '';

This should do the trick. :thumbsup:

20 Sep 2006, 7:15 PM
#19
elfboy avatar

elfboy

New Zenner

Join Date:
Sep 2005
Posts:
79
Plugin Contributions:
0

Re: Option Prices in Parentheses

I'm having a similar issue.

Thanks Oracle for that tip. I removed just the parentheses in that part of the code. It would be best (for Gift Certs) if you could show JUST the value without the option name. That way it would not make any difference if you made a mistake (i.e. assigned a $40 value to a "$50" attribute name).

I'm poking around in attributes.php and if I were a programmer I would add something like:

If products_name == 'Gift Certificate'
   $products_options_details = '';

Feel free to fix my code!!:D

BTW, a less elegant solution is to name your options differently--you CAN have several options with the same name such as "->"
You'll get a warning about "Possible Duplicate Options" but Zen lets you do it.
http://soldoutrooms.com/index.php?main_page=product_info&cPath=6&products_id=26

This might cause some confusion tho' :blink:

30 Sep 2006, 3:49 PM
#20
awoman avatar

awoman

Zen Follower

Join Date:
Dec 2005
Posts:
142
Plugin Contributions:
0

Re: Option Prices in Parentheses

There is no includes/modules/attributes.php file.