Page 1 of 3

Option Price Update Redux

Posted: Mon Mar 14, 2011 4:29 pm
by philbydevil
Great mod Q.

Has anyone been able to adjust the code so that the the colour of the updated price is different (say, red) when the product is on special?

I know how to change from the default colour (green) to another colour (mine is dark grey).

What I want to do is have the price show as the default colour (dark grey) when the product isn't one special, but change the colour to red when the product is on special.

Being a commercial mod, I don't really want to paste any code here, so if someone has already done this (or Q can guide me) then PM me. Thanks.

Re: Option Price Update Redux

Posted: Mon Mar 14, 2011 10:39 pm
by Qphoria
Try this..
1. Edit the vqmod/xml/option_price_update_redux.xml

2. FIND:

Code: Select all

$('#price').css('color', pxcolor).fadeIn('normal');
3. REPLACE WITH:

Code: Select all

$('#price').fadeIn('normal');

Re: Option Price Update Redux

Posted: Tue Mar 15, 2011 5:51 am
by philbydevil
Excellent, thanks Q. The above change, coupled with this code worked:

Code: Select all

<span id="price" style="color: #F00;"><?php echo $special; ?></span>
One other thing, is the vQmod that is supplied with this mod supposed to be "doubled-up"? You might want to have a look at the xml file, as it looks like the code has been duplicated (but I'm pretty sure it only needs to be there once).

Thanks again.

Re: Option Price Update Redux

Posted: Tue Mar 15, 2011 6:15 am
by Qphoria
Ya that was fixed on Friday. Just download and replace the vqmod

Re: Option Price Update Redux

Posted: Tue Mar 15, 2011 6:58 am
by philbydevil
Cheers. I figured that it wasn't supposed to be there so deleted the additional code anyway.

Re: Option Price Update Redux

Posted: Fri Jun 24, 2011 3:35 am
by Qphoria
New 1.5.x version just about done:
- Support for Select, Radio, and Checkbox price changes
- Supports Original Price, Special price, and ExTax price
- New update animation (my own little simple delay effect)


Teaser: http://screencast.com/t/KjehMtVX

Re: Option Price Update Redux

Posted: Thu Jul 07, 2011 4:18 am
by Qphoria
Ok new version released. Supports both 1.4.x and 1.5.x

Re: Option Price Update Redux

Posted: Wed Aug 31, 2011 3:51 am
by mamacass
I am running OpenCart 1.5.1. I have successfully installed this mod (awesome mod it is!).

Our storefront sells product by weight and I am using the options to represent each weight available for a particular product. Since each product weight has a distinct price, there is no addition or subtraction from a base price, the "option price" is the price of the weight selected in the option. I have commented out the prefix in the option dropdown, and I have also commented out the "Please Select" text, so that the first weight and its corresponding price show in the option box.

The problem is that the price displayed on the page when initially loaded says "$0.00". Is there some way to get the displayed price to default to the first option in my list (the one displayed in the option box)?

Thanks in advance for your guidance!

Re: Option Price Update Redux

Posted: Thu Sep 01, 2011 4:20 am
by mamacass
I finally got this - added some php to set the display price to the first option's price - no longer displays $0.00.

Re: Option Price Update Redux

Posted: Tue Oct 11, 2011 1:29 am
by josemacabrera
i'm using oc 1.5.1.3, and it is not working with the quantity discount prices, when i change the quantity box it display the price as if it were the normal price, eg if there is a product that cost 100 and the quantity discount is 5x$50 ea. it display $500 instead of $250.

Re: Option Price Update Redux

Posted: Tue Oct 11, 2011 2:24 am
by Qphoria
Correct, I did not add support for qty discounts. I'll see about adding that.

Re: Option Price Update Redux

Posted: Mon Oct 31, 2011 2:49 am
by fsix
Hi,

Option Price Updater is changing the styling on my price when it updates - are you able to direct me to where the styling occurs?

<span id="opu_price" style="display: inline;">$369.00</span>

using:
Opencart 1.5.1.3 w/"Zeta Shop" theme
vqmod 2.1.4
OptionPriceUpdateRedux_OCv151.5
OptionBoose_OCv1151.4

Thanks kindly,

Re: Option Price Update Redux

Posted: Mon Oct 31, 2011 12:34 pm
by Qphoria
fsix wrote:Hi,

Option Price Updater is changing the styling on my price when it updates - are you able to direct me to where the styling occurs?

<span id="opu_price" style="display: inline;">$369.00</span>

using:
Opencart 1.5.1.3 w/"Zeta Shop" theme
vqmod 2.1.4
OptionPriceUpdateRedux_OCv151.5
OptionBoose_OCv1151.4

Thanks kindly,
The code simply adds the <span id="opu_price"></span> around the price as that is how it locates, but it doesn't add the display:inline stuff and shouldn't affect styling as its only putting an id on the element

Re: Option Price Update Redux

Posted: Fri Dec 16, 2011 6:51 am
by ibuildit
i have a weird issue...

I use 1.5.1.3 and Shoppica

This is what happens:

If you go to:

https://www.therawdessertkitchen.se/ind ... duct_id=63

And change the quantity from 1 to 2 bags, the price will update and its all good, but the span that surrounded the currency has now been removed and instead it is batched together with the amount, and it breaks up the styling.

This also means that I am forced to have the price and currency on the same line, where before it was on 2 lines (before i applied css to make it show on 1 line).

I cant figure out where the code is that does this... i suspect that the vqmod uses another way to request $price than shoppica does... and usually im good at reading php code but now im lost...

please help if you know how to sort this.

Re: Option Price Update Redux

Posted: Sat Dec 17, 2011 11:14 pm
by ibuildit
Another issue in this otherwise great vqmod!

If i make a special and have multiple price options the base price will show unchanged when i pick a more expensive option and only the old overcrosse price will update! when adding to cart it adds the right price, so its confusing!

check the url above to see!

Re: Option Price Update Redux

Posted: Sat Dec 17, 2011 11:43 pm
by Qphoria
That is because shoppica is a pain in my ass. it uses a very different design than all other themes so it requires manual intervention. I may need to make a separate file for the shoppica changes

Re: Option Price Update Redux

Posted: Mon Jan 30, 2012 9:34 pm
by philbydevil
Any way to get arround this error:

Code: Select all

PHP Warning:  file_put_contents(/server/localhost/home/user/mysite.com.au/system/logs/opu_debug.txt): failed to open stream: Permission denied in /server/localhost/home/user/mysite.com.au/catalog/controller/product/option_price_update.php on line 10
I think that it happens when someone clicks on an option before the page is fully loaded. Also, the price won't update if the page hasn't finished loading.

All seems to be fine if you wait until the page has loaded.

Re: Option Price Update Redux

Posted: Tue Jan 31, 2012 3:04 am
by Qphoria
philbydevil wrote:Any way to get arround this error:

Code: Select all

PHP Warning:  file_put_contents(/server/localhost/home/user/mysite.com.au/system/logs/opu_debug.txt): failed to open stream: Permission denied in /server/localhost/home/user/mysite.com.au/catalog/controller/product/option_price_update.php on line 10
I think that it happens when someone clicks on an option before the page is fully loaded. Also, the price won't update if the page hasn't finished loading.

All seems to be fine if you wait until the page has loaded.
The error is strange because it looks like it can't write to the debug file. You can simply just disable the debug file writing in the catalog/controller/product/options_price_update.php file

remove this line:
file_put_contents(DIR_LOGS . 'opu_debug.txt', print_r($this->request->post, 1));

Re: Option Price Update Redux

Posted: Tue Jan 31, 2012 9:09 am
by philbydevil
That fixes it, thanks. Now, even if the page isn't fully loaded the price will still update and no error boxes pop up to annoy me. Cheers.

Re: Option Price Update Redux

Posted: Fri Feb 10, 2012 11:44 pm
by Zedax161
Hey guys i just installed this mod but nothing happens :(

In my vqmod log i get this error...

----------------------20120210-153221-------------------------
SOURCEFILE: /home2/redclayd/public_html/thesleepstation.co.uk_v5/catalog/view/theme/default/template/product/product.tpl
MODFILE: /home2/redclayd/public_html/thesleepstation.co.uk_v5/vqmod/xml/VQMod-Add-to-cart-ajax-confirm.xml
SEARCH: $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
OPERATION FAILED (ABORTED): NO MATCH FOR SEARCH!
--------------------------------------------------------------

any ideas? Running OC v 1.5.1 and latest vqmod