Hi!
I am setting up my first store with Opencart and was wondering if it was possible to change the way `option pricing' displays.
In the drop down choice box instead of it sayinf
Option 1 - $5.00
Option 2 + $10.00
if it's possible to say the actual price
Option 1 $47.00
Option 2 $62.00 etc?
Also, I have read other posts regarding this, and was wondering if anyone had a solution:
Having different images for different options, so if the default option was short sleeve short and the customer chose long sleeve shirt the image would change to the long sleeve shirt image (like I think PrestaShop does!).
Thanks
Ernie
I am setting up my first store with Opencart and was wondering if it was possible to change the way `option pricing' displays.
In the drop down choice box instead of it sayinf
Option 1 - $5.00
Option 2 + $10.00
if it's possible to say the actual price
Option 1 $47.00
Option 2 $62.00 etc?
Also, I have read other posts regarding this, and was wondering if anyone had a solution:
Having different images for different options, so if the default option was short sleeve short and the customer chose long sleeve shirt the image would change to the long sleeve shirt image (like I think PrestaShop does!).
Thanks
Ernie
1. EDIT: catalog/controller/product/product.php
2. FIND (~line 220):
3. REPLACE WITH:
2. FIND (~line 220):
Code: Select all
$option_value_data[] = array(
'option_value_id' => $option_value['product_option_value_id'],
'name' => $option_value['name'],
'price' => (float)$option_value['price'] ? $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : FALSE,
'prefix' => $option_value['prefix']
);
Code: Select all
$option_value_data[] = array(
'option_value_id' => $option_value['product_option_value_id'],
'name' => $option_value['name'],
'price' => (float)$option_value['price'] ? $this->currency->format($this->tax->calculate($option_value['price']+$product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : FALSE,
'prefix' => ''
);
Thanks for this fix!
This is how I was expecting OC to work, and I'm glad that your answer got it working right. Works like a charm.
Note to newbs like me: Remember that your other prices will be effected by the base price. So you'll need to adjust your other prices off of the base one. Play around, and you'll get it right.
This is how I was expecting OC to work, and I'm glad that your answer got it working right. Works like a charm.
Note to newbs like me: Remember that your other prices will be effected by the base price. So you'll need to adjust your other prices off of the base one. Play around, and you'll get it right.
Daniel M. Davis
[url=http://www.steamcrow.com]
http://www.twitter.com/steamcrow
Any idea how one would do this in 1.4.7?
I tried the old way, but it killed my product pages.
I tried the old way, but it killed my product pages.
Daniel M. Davis
[url=http://www.steamcrow.com]
http://www.twitter.com/steamcrow
Just replace the price line from that first block:
And set the prefix to ''
Code: Select all
'price' => (float)$option_value['price'] ? $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : FALSE,
Code: Select all
'prefix' => ''
How do I make this to work with the OPTION PRICE UPDATE http://www.unbannable.com/ocstore/openc ... ice_update
I'm using OC 1.4.6
right now the Price wont update the full cost of options.
is it possible?
also how to show price on items +$0
How do I make the normal cost to show on the options
thanks
I'm using OC 1.4.6
right now the Price wont update the full cost of options.
is it possible?
also how to show price on items +$0
How do I make the normal cost to show on the options
thanks
This is a great way to do it.
The only problem I've got is it only works when the price is being added to the base price.
When you subtract the price and the prefix is " - " it still shows the price as added to the base price in options dropdown although it shows the correct price in checkout.
How do you make it work so it shows the correct price in the options dropdown when the price is being subtracted from the base price?
Thanks
The only problem I've got is it only works when the price is being added to the base price.
When you subtract the price and the prefix is " - " it still shows the price as added to the base price in options dropdown although it shows the correct price in checkout.
How do you make it work so it shows the correct price in the options dropdown when the price is being subtracted from the base price?
Thanks
For some of my product options, the default price is the mid-price. The lowest priced item is an add-on item.
So product options look strange, as selecting a £17 item shows: e-booklet -£31.00. I'm doing a double take trying to figure out the price, and so will the customers
I've seen these fixes, and this one would do well:
So, how would I apply this fix, and have it work with Options Price Update? If necessary, NO price display will be OK too, since this is in the description - & the Updater shows it anyway.
I'm using 1.4.8b. If I've missed something, please point me at it. Thanks!
So product options look strange, as selecting a £17 item shows: e-booklet -£31.00. I'm doing a double take trying to figure out the price, and so will the customers
I've seen these fixes, and this one would do well:
...I DO use Qphoria's Options Price Update, and I understand from this thread that the fix shown here won't work with it?Qphoria wrote: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.
So, how would I apply this fix, and have it work with Options Price Update? If necessary, NO price display will be OK too, since this is in the description - & the Updater shows it anyway.
I'm using 1.4.8b. If I've missed something, please point me at it. Thanks!
lemongrass wrote:Hi!
I am setting up my first store with Opencart and was wondering if it was possible to change the way `option pricing' displays.
In the drop down choice box instead of it sayinf
Option 1 - $5.00
Option 2 + $10.00
if it's possible to say the actual price
Option 1 $47.00
Option 2 $62.00 etc?
Also, I have read other posts regarding this, and was wondering if anyone had a solution:
Having different images for different options, so if the default option was short sleeve short and the customer chose long sleeve shirt the image would change to the long sleeve shirt image (like I think PrestaShop does!).
Thanks
Ernie
hello
now i am in the same point but ..... i have some think more to ask ....
option 1 $47.00 reference A1
option 2 $62.00 reference A2
is not the same reference one ippod 1gb or the same ippod 8 gb
how can i have individual reference for the diference options in product
thanlk
looking also for this to work in recent version of opencart
[edit]
changed prefix and price to ' ' and now it does not show both so it works for me.
[edit]
changed prefix and price to ' ' and now it does not show both so it works for me.
Last edited by trapson on Sat Feb 05, 2011 5:44 pm, edited 1 time in total.
Opencart 1.4.9.3
in OpenCart 1.5.1
1. EDIT: catalog/controller/product/product.php
2. FIND (~line 253):
3. REPLACE WITH:
1. EDIT: catalog/controller/product/product.php
2. FIND (~line 253):
Code: Select all
foreach ($option['option_value'] as $option_value) {
if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {
$option_value_data[] = array(
'product_option_value_id' => $option_value['product_option_value_id'],
'option_value_id' => $option_value['option_value_id'],
'name' => $option_value['name'],
'price' => (float)$option_value['price'] ? $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : false,
'price_prefix' => $option_value['price_prefix']
);
}
}
Code: Select all
foreach ($option['option_value'] as $option_value) {
if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {
$option_value_data[] = array(
'product_option_value_id' => $option_value['product_option_value_id'],
'option_value_id' => $option_value['option_value_id'],
'name' => $option_value['name'],
'price' => (float)$option_value['price'] ? $this->currency->format($this->tax->calculate($option_value['price']+$product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : false,
'price_prefix' => ''
);
}
}
Hey folks, found this fix and it works almost perfectly.
I have found that this will only work correctly if the price option variation is a positive (ie set to increase the price), as the code is set to always add the value.
eg, If the main products price is $20.00, and the price option is set to -$5.00 the desired price should be shown as $15, but will shown as $25.00, even though the correct price shows in the cart if added.
I made a small addition to the alteration as seen here:
What this checks for is the prefix and then alters the price value to be a negative if the prefix is '-', if the prefix is '+" then no change is made.
Technically the number is still added, but as it is now a negative the end result is that the correct price is shown.
It's a bit crude, and there may be a more elegant way of working this out, but hopefully it comes in handy for someone.
I have found that this will only work correctly if the price option variation is a positive (ie set to increase the price), as the code is set to always add the value.
eg, If the main products price is $20.00, and the price option is set to -$5.00 the desired price should be shown as $15, but will shown as $25.00, even though the correct price shows in the cart if added.
I made a small addition to the alteration as seen here:
Code: Select all
foreach ($option['option_value'] as $option_value) {
if($option_value['prefix'] == '-'){
$option_value['price'] = 0 - $option_value['price'];
}
$option_value_data[] = array(
'option_value_id' => $option_value['product_option_value_id'],
'name' => $option_value['name'],
'price' => (float)$option_value['price'] ? $this->currency->format($this->tax->calculate($option_value['price']+$product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : FALSE,
'prefix' => $option_value['prefix']
);
}
Technically the number is still added, but as it is now a negative the end result is that the correct price is shown.
It's a bit crude, and there may be a more elegant way of working this out, but hopefully it comes in handy for someone.
Need to bump this..
So wich of the above codes should i use if i want this:
Product A - Price $10 - Option
Size 1(Current)
Size 2 = $5
Don't want +/-, because then the customer will have to sit with a calculator to figure out the prize of option size 2 wich is kinda stupid.
Please help!
So wich of the above codes should i use if i want this:
Product A - Price $10 - Option
Size 1(Current)
Size 2 = $5
Don't want +/-, because then the customer will have to sit with a calculator to figure out the prize of option size 2 wich is kinda stupid.
Please help!
Who is online
Users browsing this forum: No registered users and 13 guests