Magento Forum

   
Why are custom options changing product price to zero? 
 
Alecs00
Member
 
Total Posts:  72
Joined:  2011-05-03
 

Rename : app/design/frontend/[TEMPLATE]/catalog/products/view/options.phtml into options1.phtml( or just deleted) so magneto will lock for options.phtml in base folder.

That work for me!  Magento ver. 1.7.0.1

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pinpoint
Member
 
Total Posts:  56
Joined:  2010-01-19
 

Unfortunately it did not work for me :(

Any more suggestions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pinpoint
Member
 
Total Posts:  56
Joined:  2010-01-19
 
k2xl - 16 June 2012 03:16 PM

The above fix to priceValue is not a good idea - Magento appears to use that for “percent” discounts.

Here’s the Fix for those of you without the options file in your theme. Looks like a bug in Magento 1.7

This did it partially for me. It does not add the extra amount but it keeps the original price. In the basket it does add it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bates
Jr. Member
 
Total Posts:  17
Joined:  2011-11-20
 

I have just upgraded today and have the exact same issue. I upgraded from 1.6 to 1.70.2, please could someone direct me to a fix for this version as the above fix does not have that line of code and the file to move does not exist.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bpmsportadmin
Jr. Member
 
Total Posts:  1
Joined:  2012-08-08
 

Hello,

I tried changing line 123 in options.phtml with no result (http://k2xl.com/wordpress/custom-options-broken-in-magento-1-7-heres-the-fix/)

Someone was asking for a more detailed approach to the solution. Here’s my take.

I have theme helloresponsive and 1.7 or 1.7.2 I forget but my path was

/app/design/frontend/default/helloresponsive/template/catalog/product/view

I changed options.phtml to options_.phtml

this solved my problem as it reverts I believe to:

/app/design/frontend/base/default/template/catalog/product/view/options.phtml

I hope this helps. I was just as stranded as everyone here.

 
Magento Community Magento Community
Magento Community
Magento Community
 
agocha
Jr. Member
 
Total Posts:  3
Joined:  2010-12-29
 

Hello,

I have tried just about every solution that has been mentioned in this thread and also whatever I could find elsewhere on the net. It seems like a few people got it working. But my bad luck, I am still stuck. Probably this is because I am using a different theme (MT Dend) which others seemed to be not using as yet. Is there anyone who is using MT Dend theme came across same “price not updating” problem and found the solution? Any help would be greatly appreciated as it has been three days since I am struggling with one single issue. Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shaughn
Member
 
Avatar
Total Posts:  44
Joined:  2010-06-29
South Africa
 

If you guys are still having problems, even after following the solutions provided, it means that you still need to update several other files.

After upgrading from any version to CE 1.7, you will need to update the layout and template files in your current template directory. When upgrading Magento, only the base templates and layouts are updated. Which means you still have to manually update your existing template files.

Your template files may be in one of 2 locations:
app/design/frontend/default/YOUR_TEMPLATE/template/
app/design/frontend/default/YOUR_TEMPLATE/layout/
or
app/design/frontend/YOUR_TEMPLATE/default/template/
app/design/frontend/YOUR_TEMPLATE/default/layout/

all the base files are located at:
app/design/frontend/base/default/template/
app/design/frontend/base/default/layout/

So if you are still having trouble with this, check that you have copied:
app/design/frontend/base/default/template/catalog/product/view/options.phtml
to your template folder, else you can just remove it from you template folder as Magento will use the base template if it cannot find the template file in your current template.

also be sure that your layout has the following blocks added at around line 222-239 similar to app/design/frontend/base/default/layout/catalog.xml

Make sure that all your template and layout files in your current design contains all updates.

You can easily check that this works by switching your design template and layout in the backend to “default”

 
Magento Community Magento Community
Magento Community
Magento Community
 
ryanb4614
Jr. Member
 
Total Posts:  8
Joined:  2012-06-10
 

I have tried everything on here. I go back and forth with my default theme and I am still experiencing issues. What I have is a configurable product with a few extra custom options there may be fixed fee in such as “proof” or also the custom option may increase by a percentage or there might not even be a fee associated with the custom option, but this is causing it to go to 0 zero. When I add the product to the cart it shows in the cart only as the configurable product price. Without the custom option fees.

Basically I do printing and customers have an option to upload their image or select to have a professional design done which has a fee attached. Also they have the option to select a free proof (custom option) with a yes or no radio button.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dickd
Jr. Member
 
Total Posts:  15
Joined:  2010-10-15
 

New install 1.7.0.2

/app/design/frontend/default/helloresponsive/template/catalog/product/view

I changed options.phtml to options_.phtml

Worked for me

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nition1
Jr. Member
 
Total Posts:  19
Joined:  2009-05-31
 

Upgraded from 1.5.2 to 1.7.0.2 (Default theme)

I had the same problem.

I followed Alecs00 and Dickd to change or delete the “options.phtml” file.

/app/design/frontend/default/default/template/catalog/product/view

In my case I changed “options.phtml” to “options_.phtml” and IT WORKED!

 
Magento Community Magento Community
Magento Community
Magento Community
 
nadshez
Member
 
Avatar
Total Posts:  48
Joined:  2008-04-16
 

Solutions that have worked for others here have unfortunately failed for me. After upgrading to 1.7.0.2, on my test site, price is not updated for the custom options. It doesn’t get set to 0 either. I believe the problem is somewhere in this part of the code (around line 105) in app\design\frontend\base\default\template\catalog\product\view\options.phtml

Product.Options = Class.create();
    
Product.Options.prototype {
        initialize 
: function(config{
            this
.config config;
            
this.reloadPrice();
            
document.observe("dom:loaded"this.reloadPrice.bind(this));
        
},
        
reloadPrice : function() {
            
var config this.config;
            var 
skipIds [];
            $$(
'body .product-custom-option').each(function(element){
                
var optionId 0;
                
element.name.sub(/[0-9]+/, function(match){
                    optionId 
parseInt(match[0]10);
                
});
                if (
config[optionId]{
                    
var configOptions config[optionId];
                    var 
curConfig {price0};

                    
alert(element.name);            // my debug alert

                    
if (element.type == 'checkbox' || element.type == 'radio') {

                        alert(element
.checked);     // my debug alert

                        
if (element.checked) {
                            
if (typeof configOptions[element.getValue()!= 'undefined'{
                                curConfig 
configOptions[element.getValue()];
                            
}

BTW, I have 2 custom options, both using ‘radio’.

Putting alerts on my upgraded site and the older one, I have realized that the older 1.4 code would go through each radio option one by one and return ‘true’ for the selected option thus also updating the price. Whereas in the 1.7 upgraded code, only first radio option works i.e. any price increment/decrement assigned to it changes the price and none of the other radio options have any effect. And that is because the loop in the above code only goes through first option of the first radio group. For example say the product price is 1000

Bulk discount
( ) 5% on 5 units
( ) 10% on 10 units
( ) 12% on over 10 units

Color
( ) Add 50 for White
( ) Add 60 for Black

Now in the above radio groups, only selecting ‘5% on 5 units’ has any effect on price. That is because the loop only checks the first option of the first radio group and returns ‘false’ against any other option selected at (element.checked) check & gets out. So since the other options never get validated, they never have any affect on the price either. Sadly, I don’t know how to fix it and that is where I hope someone in the magento community can help me out (along with others perhaps). I have multiple set of custom options for a lot of products and I cannot upgrade to the newer version without fixing this first. All help would be much appreciated. Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
integer_net
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2012-09-05
Aachen, Germany
 

For those who don’t have the mentioned lines in the options.phtml (like me – are there really two different versions of Magento 1.7.0.2??), you can adjust the file js/varien/product.js.
In lines 693 and 694 you have the following code:

subPrice += parseFloat(el.price);
subPriceincludeTax += parseFloat(el.price);

Replace this with the following code:

if (!isNaN(parseFloat(el))) {
    subPrice 
+= parseFloat(el);
    
subPriceincludeTax += parseFloat(el);
else {
    subPrice 
+= parseFloat(el.price);
    
subPriceincludeTax += parseFloat(el.price);
}
If you are using prices without tax and with tax, you might have to modify the lines before accordingly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
johnrich85
Jr. Member
 
Total Posts:  3
Joined:  2012-05-15
UK
 

I had a similar problem in 1.7.0.2 which turned out be an issue with the ‘Simple configurable options’ extension. If you are using this extension it might be worth checking the following template:

app/design/frontend/base/default/template/catalog/product/view/scpoptions.phtml

OR, if you have added this file to your own theme

app/design/frontend/default/YOUR_THEME/template/catalog/product/view/scpoptions.phtml

From around line 99 onwards, you will find lines which look like the following:

price += parseFloat(config[optionId][element.getValue()])

For me, this value was returning an object, resulting in a value of ‘NaN’. Change this to :

price += parseFloat(config[optionId][element.getValue()].price)

To get the price from the object.

Make sure you find all the lines beginning with ‘price +=’ and add .price to the end.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jigesh
Jr. Member
 
Total Posts:  4
Joined:  2011-06-02
 

For Magento Hello Wired Theme and Magento 1.7.0.2 Price Do not change if we change custom options drop down.

Please update your layout catalog.xml on app/design/frontend/default/YOURTHEME(HELLOWIRED)/layout/custom.xml

i found problem is between line : Additional block dependant on product type so first find Additional block dependant on product type and replace codes of additional block dependent on product type with magento catalog.xml code you may find it in app/desing/frontend/base/default/layout/catalog.xml

your problem may be differ so first try to replace whole file and if it works than step by step replace codes hope it works.

For any magento needs, send me mail on jigesh.raval@gmail.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
MartinTT
Jr. Member
 
Total Posts:  16
Joined:  2009-06-23
 
patrecord - 15 May 2012 12:59 PM

Solved for 0 price! Just replace app/design/frontend/[TEMPLATE]/catalog/products/view/options.phtml file with some file but in /BASE folder.

I wish help you!

Thanks a lot(!) Saved my day;)

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top