Jump to content

[Solved] Product Combination error


ruchit.devil

Recommended Posts

Hi,

 

My product combination is not working.

I am able to create combinations in the back office but it is not reflected in front office.

click the following url to check the problem.

 

http://www.thelaptopcare.in/studio/878-battery-for-dell-studio-xps-l402x-l502x-l702x.html

 

I had created the combination as compatible and genuine.

i had kept the price of compatible as 1550 and the price for genuine as 3600. but when i select genuine, it shows me the same price as the compatible.

 

this problem occur only for newly added product. for older product, there is no such issue.

Edited by ruchit.devil (see edit history)
Link to comment
Share on other sites

also there is one more error.

The category menu is displayed for older products but it is not been displayed for new products.

So, for new products the product combination is not shown and the category menu does not appear on the left.

 

Please help me out. Unable to add new products.

Link to comment
Share on other sites

Hi Webdev,

 

thanks for the reply. 

Can you please tell me which line exactly has to be edited. 

I am not a programmer. 

 

thanks 

 

in your  product.tpl like this

 

// Translations
var doesntExist = '{l s='This combination does not exist for this product. Please select another combination.' js=1}';
var doesntExistNoMore = '{l s='This product is no longer in stock' js=1}';  // you need to add this line in your product.tpl.
var doesntExistNoMoreBut = '{l s='with those attributes but is available with others.' js=1}';
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Hello webdev0008,

 

You seem to know a lot about those javascript errors. I started a topic on a very strange error that sometimes appears and sometimes not. The error appears only on products with attributes.

 

Here is the topi:

http://www.prestashop.com/forums/topic/318175-add-to-cart-button-disappears-on-product-page-with-combinations-only-sometimes/?do=findComment&comment=1612226

 

Thank you.

Link to comment
Share on other sites

  • 1 year later...

Hello, I have a problem in my prestashop, the product combination do not work they were working fine till earlier today. But now after some products I added the entire product combinations on the site stopped working. the price stays the same no matter the combination or price impact and when adding to cart, it only adds the default combination for that particular product.

 

Can anybody help me, I have little to no idea of coding or how to solve this issue.

 

the link is www.nkflyer.com and try any product combination

Edited by Karelljoan (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hello webdev0008,

 

You seem to know a lot about those javascript errors. I started a topic on a very strange error that sometimes appears and sometimes not. The error appears only on products with attributes.

 

Here is the topi:

http://www.prestashop.com/forums/topic/318175-add-to-cart-button-disappears-on-product-page-with-combinations-only-sometimes/?do=findComment&comment=1612226

 

Thank you.

Hello, did you solve the problem... I am looking for a solution too.

 

Thanks

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

I had this same problem as well, but i think this might be specific to me only. Anyway, i share my solution:

 

Inside your theme folder, look for : js folder. Example:

 

prestashop_directory/themes/your_theme_folder/js/

 

Inside this folder, try to look a javascript file called : 'product.js' and open it with your text editor (e.g. Sublime Text).

Find the following line:

 

i.e. Hit CTRL + F and search for 'combinationsFromController'

function updatePrice()
{
// Get combination prices
var combID = $('#idCombination').val();
var combination = combinationsFromController[combID];


if (typeof combination == 'undefined')
return;

In my case, the reason that "Add to Cart" button is missing, because i had a javascript error that says : "variable combinationsFormController is not declared". REMEMBER, yours might be different.

 

Try to modify the above code so it looks like this:

 

 

function updatePrice()
{
// Get combination prices
var combID = $('#idCombination').val();
var combination = combinationsFromController[combID];
typeof combination = 'undefined';


if (typeof combination == 'undefined')
return;

Notice that i add a new line : 

typeof combination = 'undefined';

Remember:

  1. This is a temporary fix. Add that new only will always set the combination to 'undefined'. Meaning, your product combination will always fail to work. I don't mind with this, since my product does not required any combination.

The real solution would be to declare this var 'combinationsFromController'. However, i have no idea in which function or where should i declare that. Perhaps anyone knows ?

 

Hope this helps.

Link to comment
Share on other sites

  • 2 months later...
Guest locen

Hi, I'm not abe to add combinations in products. 


if i click generate values no combinations added but i see "successful update"


version 1.6.0.9


 


Please help me


thanks  :)

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

I'm not sure but I think I have the same or a simuler issue on my shop.  It started after upgrading to the latest version 1.6.1.2.  I have combinations active for items that have different colours and/or prices so they could be ordered from the same product page with a different ref. number.  I can still see the combinations/other colours in the front(and back) office but when you click on a different combination it will only appear for a moment resetting it self back to the default product item.  This is the same for all my combination items.  Could someone please have a look at his and help me out?

 

This is a link to an example on my shop : http://www.pfleiderer-glass-works.com/shop/euro/en/beach-line/29-italesse-beach-line-flute-prive-beach-box-4pcs.html

 

 

Thanks a lot! 

Serge.

  • Like 1
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...