Post by YarniaPDX » Sun Sep 05, 2010 8:07 am

When configuring a product, the 'Options' tab is very confusing. I have many products where choosing a different option will affect the price, but I want this to happen internally, and not be visible in the drop-down menu.

For example, one of my products is a gift certificate. The default product price is $20, but I want customers to be able to select an alternative value, say $30, $40, or $50.

If I enter $30 as the Option Value, "+" as the prefix, and "10" as the price increase, then from the customer's point of view, it shows up as "$30 + $10" in the drop-down menu. This is obviously very confusing to the customer.

How can I hide this weird prefix thing from the customer, while keeping it functional on the back end, so that OpenCart knows to update the item's price accordingly if selected by a customer?

As it stands now, I'd have to create separate products for each denomination of gift certificates, which is clunky, and obviously defeats the purpose of having "options".

Thanks!

Active Member

Posts

Joined
Sat Sep 04, 2010 7:10 am

Post by cevarief » Sun Sep 05, 2010 2:42 pm

Open up yourtemplate/product/product.tpl

Remove this code to remove prefix and price option :

Code: Select all

<?php if ($option_value['price']) { ?>
   <?php echo $option_value['prefix']; ?><?php echo $option_value['price']; ?>
<?php } ?>
Cheers!
Cevarief

Active Member

Posts

Joined
Wed Jun 02, 2010 10:52 pm

Post by Qphoria » Mon Sep 06, 2010 1:40 am

This should help you understand how options were designed.
http://www.opencart.com/index.php?route ... &path=9_61

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by cmebd » Mon Sep 06, 2010 5:38 am

Hi Q,

Just to expand:

Your example:

Chanel No. 5 Perfume $50.00
- 50ml
- 75ml (+10.00)
- 100ml (+20.00)

Is fine for one option but if you wanted to use more than one option for a product repeating the original product in the first value would not work well.

Using your example for additional options:

If one then wanted to create, say, a gift wrapping option:

Option name: Gift Wrapping
Option value 1 :-Either a blank value or "Gift Wrapping Options"[/b]
Option value 2 : (+3.00)
Option value 3 : (+4.00)

I have seen a site where they have included the first value of the first option on each option created and when "sending to cart" the price came out at $750.00 instead of $175.

cheers

A stupid question is the one you -don't- ask.........(Anon)

)C1.5.0.1 (IN devel)
OC V1.4.9.5
OC V1.4.9.2
OC V1.4.7
OC V1.3.4


User avatar
Active Member

Posts

Joined
Fri Nov 13, 2009 11:17 am
Location - Tasmania, Australia

Post by Qphoria » Mon Sep 06, 2010 7:01 am

I don't understand. In your example it wouldn't be any different

Channel No5 50.00
Size:
- 50ml
- 75ml (+25.00)
- 100ml (+50.00)

Gift Wrapping:
- No Giftwrap
- Giftwrap (+3.00)
- Giftwrap & Bow (+4.00)

Boxed:
- No Box
- Box (+3.00)



And as I also showed, you could use the first option with a price, that is entirely up to you if you want

Product: 10.00
Color:
- Red (+10.00)
- Green (+10.00)

But if you are requiring at least $20.00 for the item then it's just a bad way to do business and people will feel scammed.
Just like if you set the product to 0.00 and set the first option to 10.00. People think its free then get hit.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by cmebd » Mon Sep 06, 2010 7:22 am

Simply expanding on your "correct" way to add options.

You example is great if there is only one option however with additional options, such as gift wrapping, because of the nature ie, the base product order would not require gift wrapping.

In the following example if I wanted to buy a red t-shirt and didn't want a design based on the document:

Product: T-Shirt
Price: $20.00

Option: Colour (selection)
value 1: White
value 2: Blue
Value 3: Red

Option: Design (selector)
value 1: Design 1 (+ $5.00)
value 2: Design 2 (+ $6.00)
Value 3: Design 3 (+ 47.00

The above does not give the customer the "option" of NOT haveing a design and ending up with a bill of $20 + $5.00 for the 1st design.

Whereby:

Option: Design (selector)
value 1: No Design - OR Blank (+ 0) - with a sort code of "0" (to place it at the top of the list)
value 2: Design 1 (+ $5.00) - logically sort order of 1
value 3: Design 2 (+ $6.00) - sort order of 2
Value 4: Design 3 (+ $7.00) - sort order of 3

Sort orders are also important in this scenario.

This was not explained in your document.

A stupid question is the one you -don't- ask.........(Anon)

)C1.5.0.1 (IN devel)
OC V1.4.9.5
OC V1.4.9.2
OC V1.4.7
OC V1.3.4


User avatar
Active Member

Posts

Joined
Fri Nov 13, 2009 11:17 am
Location - Tasmania, Australia

Post by Qphoria » Mon Sep 06, 2010 9:02 am

cmebd wrote:Simply expanding on your "correct" way to add options.

You example is great if there is only one option however with additional options, such as gift wrapping, because of the nature ie, the base product order would not require gift wrapping.
Doesn't look like you even read what I posted. I just showed you how it works with multiple options. The ONLY way to do it correctly is my way

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by cmebd » Mon Sep 06, 2010 9:22 am

Qphoria wrote: Doesn't look like you even read what I posted. I just showed you how it works with multiple options. The ONLY way to do it correctly is my way
Yes I did however if you read my post you would see that I was referring to the "document" in the link that you provided in the earlier post. That documentation does not outline the discussion here.

A stupid question is the one you -don't- ask.........(Anon)

)C1.5.0.1 (IN devel)
OC V1.4.9.5
OC V1.4.9.2
OC V1.4.7
OC V1.3.4


User avatar
Active Member

Posts

Joined
Fri Nov 13, 2009 11:17 am
Location - Tasmania, Australia

Post by YarniaPDX » Fri Sep 10, 2010 10:10 am

Thanks for the discussion. I think the best option will be to just remove the "+20" etc. from the drop-down menu, as it is not even surrounded by parentheses, and thus seems like it will be confusing to my customers. I'll give that a try and hope it works, thanks!

Active Member

Posts

Joined
Sat Sep 04, 2010 7:10 am

Post by YarniaPDX » Fri Sep 10, 2010 10:15 am

Thanks for the discussion, everyone. I still feel like having the "+20" in the drop-down menu is super confusing for customers, especially since they're not actually enclosed in parentheses like in the examples you all are giving. I think it will be much clearer to just remove the "prefix."

This answer is exactly what I need (thanks!) My confusion, though is that I can't find the file. From my root directory, I have admin, catalog, cgi-bin, download, image, and system folders. Where is this product/product.tpl file located?

Thanks!!
cevarief wrote:Open up yourtemplate/product/product.tpl

Remove this code to remove prefix and price option :

Code: Select all

<?php if ($option_value['price']) { ?>
   <?php echo $option_value['prefix']; ?><?php echo $option_value['price']; ?>
<?php } ?>
Cheers!
Cevarief

Active Member

Posts

Joined
Sat Sep 04, 2010 7:10 am
Who is online

Users browsing this forum: No registered users and 173 guests