Jump to content

Help with attributes.... I've been trying to find a solution for 2 days!


Recommended Posts

Hi all,

I'm still having problems with attributes.

When I add an attribute to an item it will always add the default attribute to the cart, even if a different attribute is selected!

The other issue is that when an attribute other than default is selected the email box appears stating "notify me when available". This happens when the product is in stock and out of stock! And if you click add to cart, it adds the default attribute instead of the one selected, if it is out of stock it does the same!

Check out this sample I've left up:
http://www.totallybike.com/product.php?id_product=25

I've set it to 10 in stock for each item, but have a play around yourself with different combinations and you'll see what I'm talking about!

PLEASE PLEASE PLEASE help.

I need this fixed asap!

Regards
Gary

Link to comment
Share on other sites

There are Javascript errors on your product page that say 'oosHookJsCodeFunctions' is undefined. This is probably the cause of your problems. Have you made any changes to product.php or js/product.js in your theme's directory? You could try backing up those files and overwriting them with fresh copies.

Link to comment
Share on other sites

Hi Rocky,

thanks for getting back to me.

I have a back up saved on my PC. If I just delete the existing files via FTP (product.php and js/product.js) and upload the back up versions should this fix the problem? Will it change anything else I have set up?

I've done nothing to alter these files in the past, I'm not a coder so it's all point and click in BO.

Thanks
Gary

Link to comment
Share on other sites

Hi Juan,

It seems to be working now. Rocky is going to look at it again for me when he gets back from holiday though as there is still an error showing on the page.

You need to disable the compatability with v1.1 themes first of all (doing this will alter the appearance and animation of your shopping cart). To do this go to Preferences in back office, scroll to the bottom of the page and turn v1.1 compatability off.

Then test your cart appearance out on your site. If you don't like it try turning Ajax cart off. To do this go to modules in the back office, find your cart module and select configure. When it opens turn ajax cart off.

Now test your site again and see what you think.

This seems to have worked for me. Have a look www.totallybike.com

I'm still updating my product list but if you go into adult bikes then rigid bikes, then select one it should give you an idea of what the result will look like. Try adding one to the cart to see what it looks like. You will also notice that I've removed the add to cart button in the category listing and that it just says view now. I did this because if someone clicks add to cart and the item has different attributes it will automatically add the default item to the cart and not give them a chance to select the required attribute (frame size in my case), or it will add the attribute that is in stock if say one is in stock and one is out of stock. Let me know if you need help removing this as it is simple enough (I'm not a programmer and it was easy to do).

Hope this helps
Gary

Link to comment
Share on other sites

My prices are the same, the customers only need to select a frame size.

Have you went into the product and checked combinations to make sure the prices vary for the different attributes? Or used attribute generator?

The only other thing I suggest doing is backing up your prestashop and reinstalling product.php or js/product.js (the second file is found in your themes folder). I did this using FTP, it was easy to delete the old one and then just to upload that one file from my desktop.

Link to comment
Share on other sites

I have solved it, thanks a lot for your help. I have done the following:
1) I have downloaded a fresh copy of Prestashop and copied product.php, product.js and product.tpl to my install
2) In product.tpl I have changed line 35. Instead of

var displayPrice = {$priceDisplay};

I have wrote:

var displayPrice = 2;//{$priceDisplay};

I got this idea from here:
http://www.prestashop.com/forums/viewthread/27755/P15/general_discussion/need_help_with_combinations__attributes__not_working_in_front_office/

Cheers

Juan.............

Link to comment
Share on other sites

Hi totallybike,

Yes, only with that everything was solved. I had exactly the same problem that you had: "When I add an attribute to an item it will always add the default attribute to the cart, even if a different attribute is selected! The other issue is that when an attribute other than default is selected the email box appears stating “notify me when available”. This happens when the product is in stock and out of stock! And if you click add to cart, it adds the default attribute instead of the one selected, if it is out of stock it does the same!"

Well, I didn't try with an out of stock product.

And I also had the javascript error ‘oosHookJsCodeFunctions’ is undefined

Now everything seems to work ok.

Juan..........

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...