Jump to content

Adding combinations fails without error


Recommended Posts

I'm getting a weird problem with adding combinations - I simply can't.

 

I've set up a product group "Quantity" and attributes "Case of 12" and "Case of 24"

 

When open a product and go to the combinations tab, enter the information and click "Add this combination" the page seems to "refresh" but the combination is never added. There is no error message but the product simply isn't added and no reason why is given.

 

I've tried the "Product combinations generator" and this does add a combination but then makes it the default and wont let me remove it from default. i.e. I can't edit the combination made by the generator when I'm back on the main Combinations page.

 

Any ideas how I could fix this/figure out what's going on? The fact there is no error seems odd and Googling the error and searching this forum turned up no possibles as far as I can see. I have seen something about editing the database fields with a query but can't remember where I found that (it was in the bug tracker somewhere.

 

It almost looks to me (untrained eye) like it could be an ajax issue since upon the refresh, the combination isn't added.

 

Details of Hosting:


  •  
     
    Linux

  • PHP Version:
     
    5.2.17

  • Hosting Provider:
     
    HostGator

  • Web Server:
     
    Apache 1.3 or later

  • Desktop OS:
     
    Windows

  • Mysql Version:
     
    5.0

 

 

 

 

 

 

I've reported this as a bug but haven't had a reply just yet.

Link to comment
Share on other sites

I do not think this is a bug because I have never come across this before. I would need to login to your BO to see what is happening in order to try to assist with the problem.

 

What version of PS are you using?

 

Marty Shue

 

Thanks for the reply and offer for help.

 

I've just upgraded my shop to 1.4.6.2 and installed a new theme. It's been a bit of a nighmare with various glitches that could either be hosting issues, permissions, theme errors, my own stupidity etc(?)!

 

I've managed to add combinations for the Himalayan Salt Licks by using the generator so I suspect there's a problem with the scripting on the page somehow?

 

Thanks

Link to comment
Share on other sites

Normally you can select which combination is the default by clicking on the "sun" on its row.

 

If that doesn't work for you the question is what is the difference. Don't you see the "sun"s or does clicking them not work?

 

Did you check this on a clean experimental installation on your home/work computer?

Link to comment
Share on other sites

Normally you can select which combination is the default by clicking on the "sun" on its row.

 

If that doesn't work for you the question is what is the difference. Don't you see the "sun"s or does clicking them not work?

 

Did you check this on a clean experimental installation on your home/work computer?

 

Hi - Yes I checked this on a clean installation on the same hosting server that my main shop is on. Sorry to all if I'm not giving enough detail.

 

Here's the weird thing: On the clean installation, if I create a new product and click the combinations "tab", add the "Group", "Attribute", click Add then set the impact on price and stock etc - When I click "Add this combination" the page seems to refresh (the part with the "tabs" on it anyway i.e. ajax style) and the single combination gets added to the table at the bottom highlighted in blue - all as expected.

 

On my live site - when I try the above and click "Add this combination" - the page seems to "refresh" in the same way but the combination is simply NOT added to the table of combinations at the bottom. The click of the button seems to have no effect. i.e. the combination does not get added even though the page goes through the "refreshing & updating" procedure as far as I can tell.

 

However, if I click on "Product combinations generator" and then add the combinations, click Generate and then "Back to product", the combinations are right there in the combinations table at the bottom.

 

My basic knowledge (very basic) leads me to think this is possibly a scripting error/misconfiguration, permissions issue or possibly something isn't right in the database tables.

 

I did notice that the template I've used to update my site, which I bought from Templatemonster has in the templates folder a "js" folder in which there is a "product.js" file which has code in it to do with combinations. So I compared the contents of this file to the default prestashop 1.4.6.2 theme's "product.js" The contents seem very similar - no sign of coding that is to do with the theme functionality itself as far as I can tell and the same with the other javascript files in this folder - and so I tried replacing the whole "js" folder in the current live theme with the js folder from the default prestashop theme. No noticeable effects from doing that - I think it needed to be done anyway as the "versions" of the javascript files in the bought theme folder didn't match the current prestashop version and there didn't seem to be any customisation of them either. So no luck there.

 

I have seen somewhere in the bug tracker that someone has a problem with combinations of some sort and found it to be a configuration error on the hosting side - fixed the error apparently - but then didn't post a reply to say what the error was! So I'm thinking maybe it's a permissions error somewhere. I've also had an online chat with tech support at Hostgator and got them to check over my permissions and as far as they are concerned - all is fine as far as they can tell. How can I check proper permissions for the whole installation?

 

I've also tried changing the theme of the admin interface to see if that would make any difference but it doesn't. I have been getting the odd Manufacturer and Supplier type ajax errors I've seen posted about but I think that had to do with opening two admin interfaces to separate shop installations (live and dev) in separate tabs of chrome. I've also tried all this in IE and Firefox to the same result.

 

I really am struggling to methodically pin this down. Is there any way I can trace what happens when I click the "Add this combination" button? I use Firebug in Firefox - I think this can do that sort of thing? If so then can someone please let me know how?

 

Thanks for replies so far - maybe some of the above has hinted at what's causing the issue.

Link to comment
Share on other sites

I am not a specialist on this but I have some suggestions that might help:

 

- did you check what happens in the database when you add a combination? If you look with mysqlAdmin before and after you add a combination the number of records in some tables should increase. Easy to check - for example with a screendump. If records are added but they are not visible it might be a bug where some fields are not correctly set.

 

- you write about javascript but most of the work is done in PHP. From the index.php most likely one of the files in the TABS subdirectory of your ADMIN directory is called. My guess would be that it is AdminProducts.php. If no records are added you could check here why.

Link to comment
Share on other sites

I am not a specialist on this but I have some suggestions that might help:

 

- did you check what happens in the database when you add a combination? If you look with mysqlAdmin before and after you add a combination the number of records in some tables should increase. Easy to check - for example with a screendump. If records are added but they are not visible it might be a bug where some fields are not correctly set.

 

- you write about javascript but most of the work is done in PHP. From the index.php most likely one of the files in the TABS subdirectory of your ADMIN directory is called. My guess would be that it is AdminProducts.php. If no records are added you could check here why.

 

Thanks for reply - sorry for taking so long to get back here - I've been away.

 

I've checked over the AdminProducts.php file and looked over other files that may be involved and can't seem to pin this down.

 

Some of the custom work I've had done may be the problem here as there are tables in the database that aren't part of the standard installation. I've already run a compare on every file in my installation against the core prestashop 1.4.6.2 files (untouched) and all looks fine to me.

 

This feels like finding a needle in a haystack.

 

Can anyone tell me how to trace what happens when I click the "Add combinations" button or tell me the mechanism of what happens (should happen) when I do? i.e. what files are called/involved and what database tables are read/written? Would really appreciate that info if possible. I'm not yet techncially proficient enough to figure it out for my self....

 

Thanks

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...