Page 1 of 1

add product option 'no prefix' to specify a price

Posted: Wed May 19, 2010 11:23 pm
by apothecary
I would appreciate a small modification to the product option prefix value to allow a price to be set directly by the option price field without reference to the displayed product price.

Currently the only prefixes for a product option price are + or - . I have the situation where I want to take the full price or a deposit so if the product is £500, say, I then have to set the deposit option as - £450 to achieve a £50 deposit. I would like to be able to specify the deposit directly and this could be done by allowing a blank prefix as well as + or - where the blank prefix would mean that the option price is the price to be used.

Any chance this might make 1.4.8?

Re: add product option 'no prefix' to specify a price

Posted: Wed May 19, 2010 11:32 pm
by Qphoria
Well lets discuss it here so others can chime in on how they'd like it to work

Currently, as you know, the products and options work like this:

Code: Select all

Product Price: 10.00
option 1: +2.00 (10.00 + 2.00 = 12.00)
option 2: +5.00 (10.00 + 5.00 = 15.00)
You want to price the product by options. There are a few ways to do it, and some pros and cons of each

1. You can fake it.
Instead of +2.00 you can change it to show the actual price
Product Price: 10.00
option 1: 12.00
option 2: 15.00
The problem here is that it could be confusing unless you are using an auto-update script like my Option Price Update.

2. We could add a setting "Price by Options" in the product edit.
It would hide the actual price at the top and you would only show the price in the options menu
option 1: 12.00
option 2: 15.00
The problem here is that other pages (Category, search, bestsellers, etc) would all need to use a different method to get the price for their pages. Although, it may be possible to change the price model function to get the lowest option price if that flag is set and just use that. But that is more of a controller change, and that is a lot of tedious work.

3. We could use "Price by Options" in the product edit but then you would use the main price for the "starting at" price so that it doesn't break the other pages that show prices. The owner would be responsible for putting in the correct starting at price (basically whatever your cheapest option is would be the starting at price)

Any other ideas?

Re: add product option 'no prefix' to specify a price

Posted: Thu May 20, 2010 12:00 am
by apothecary
Thanks for the quick response but I'm not sure I understand why the simple approach won't work.

Currently we get the price by a formula: total price = display price +/- option price

All I am asking is to extend the list of formulae to include: total price = option price

This can be indicated by a blank prefix selected from the same pull-down giving the + or - option. This seems to me, knowing nothing of the inner working of Opencart, to be a pretty easy modification.

I'm new to Opencart and don't understand the implications of this but you don't seem to offer the above modification in your list of options. It might be worth spelling out what is wrong with it to aid any subsequent discussion.

Re: add product option 'no prefix' to specify a price

Posted: Thu May 20, 2010 12:07 am
by Qphoria
Because your Customer will see

Price: 10.00
Availability: In stock
Model :xxxx

Option 1: 12.00
Option 2: 15.00

So if they choose 12.00, they will still see 10.00 at the top which may or may not confuse them. This is fine for a quick solution if that is all you are after. But others have asked for a more complete solution so I was bringing that up here.

Re: add product option 'no prefix' to specify a price

Posted: Thu May 20, 2010 12:14 am
by Qphoria
This is an old thread where I describe how to make it just show the full price:

http://forum.opencart.com/viewtopic.php ... 29&p=65891" onclick="window.open(this.href);return false;

Re: add product option 'no prefix' to specify a price

Posted: Wed Sep 28, 2016 12:05 am
by faca5
Hello.

You can use extension Product Option Prefix:
http://www.opencart.com/index.php?route ... n_id=28021