viger Posted September 17, 2013 Share Posted September 17, 2013 (edited) Hi, I need a change to the code to solve a problem about the management of the quantity in the stock of a product with attributes. I use PS 1.5.0.17 This is the scenario (a lot of people are in this situation): - I produce and sell a car (just an example) - I can mount some optionals: e.g. a Radio and a TomTom - The optionals are not sold separately - I create attributes and combinations: Radio yes/no, TomTom yes/no - The car is always one but in the stock of prestashop there are now four! - If a customer buys it with or without accessories, PS will held the car available for sale in the remaining 3 combinations - If I don't manual reset in real-time of the available quantity for sale, another customer can buy and pay in advance what really does not exist, and I can have a great problem... So I need to change how PS manage the available quantity for sale for a product that has attributes in this way: when a product that has combinations is purchased, all combinations of that product must be lowered of the quantity purchased Is it possible? Exist something that do this? Can I have a quote for this mod? I need just the modification, I can change the code myself in my shop. Even a "brutal" change that involves all the products in the shop, not necessarily an option or a "cool" module or something so. Just the cheaper way to achieves the goal. It's a good idea for develop a module, too. Many people has my problem. I hope my explanation is clear enough, my English is bad... In case, just ask. Waiting for good news ... Edited September 19, 2013 by viger (see edit history) Link to comment Share on other sites More sharing options...
Dh42 Posted September 17, 2013 Share Posted September 17, 2013 You should check out Attribute Wizard Pro from Presto- changeo, I think it can do what you need. http://www.presto-changeo.com/en/attribute-modules/34-attribute-wizard-pro.html Link to comment Share on other sites More sharing options...
viger Posted September 17, 2013 Author Share Posted September 17, 2013 Thanks for your reply. I have already test that module, but it doesn't resolve my problem, the way in which attributes and quantity of the product are managed seems to be the same. The product with an attribute is considered as a product itself, NOT a product plus an attribute... So, two attributes for one product = four product! Link to comment Share on other sites More sharing options...
Dh42 Posted September 17, 2013 Share Posted September 17, 2013 It is all how you use the module think about setting it up like this. An attribute with the stock of 1 for the car, an attribute with a stock of 10 for the radio, an attribute with a stock of 10 for the tires. Then, since the module is written well, every attribute has a unique css id, just hide the attribute for the car with a display:none. Then your product will only have a stock of 1. Link to comment Share on other sites More sharing options...
viger Posted September 17, 2013 Author Share Posted September 17, 2013 If I well understand, I must create a "fake" attribute that is not an optional, it's just a fake, set it's value to the same quantity of the car, and force to "buy" it together with the car. So, if someone buy the car, buy the fake attribute, too. And if one of the attributes is set to 0, the product is not available. I'm correct? So we just need to hide this fake attribute in the front office. I analyzed the source code of FO of AWP (always in the demo) but I find that the unique css id is for the contents of the option box (e.g. awp_cell_cont_113). So, putting it to display:none the small box of the fake option remain, empty, but it remain. Is this you mean? I'm correct? Link to comment Share on other sites More sharing options...
viger Posted September 19, 2013 Author Share Posted September 19, 2013 Solved in very short time and at very good price by the user Violetsmith! A really good job, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now