zeki893 Posted December 8, 2014 Share Posted December 8, 2014 Hi anybody know how to modify the combinations generator so that we can get unique reference codes? Currently it uses the same code for all new combinations. Would like to add the color and size attribute to it for example <reference>-<color>-<size> Any help is appreciated Link to comment Share on other sites More sharing options...
wgeppert Posted December 8, 2014 Share Posted December 8, 2014 Hi, I developed a product builder what would do the Job. Please see attached Screen shot. Link to comment Share on other sites More sharing options...
zeki893 Posted December 24, 2014 Author Share Posted December 24, 2014 Hi, I developed a product builder what would do the Job. Please see attached Screen shot. where can i find this? where does it generate a unique reference code? Does anybody else run into this problem? I'm using the amazon module and updating reference code for every size and color combination is taking up a lot of time. Link to comment Share on other sites More sharing options...
wgeppert Posted December 25, 2014 Share Posted December 25, 2014 Hi zeki893, You can tell exactly what you want to do and I will provide you this app as testversion for your use only. The requirements are Windows, .NET 4.0, MySQL installed. I would upload a zip in the cloud. Link to comment Share on other sites More sharing options...
zeki893 Posted January 7, 2015 Author Share Posted January 7, 2015 (edited) Hi zeki893, You can tell exactly what you want to do and I will provide you this app as testversion for your use only. The requirements are Windows, .NET 4.0, MySQL installed. I would upload a zip in the cloud. hm... i was looking for something in the back office. i guess i can try it out. i want to generate combinations with unique reference. Edited January 7, 2015 by zeki893 (see edit history) Link to comment Share on other sites More sharing options...
zeki893 Posted March 2, 2015 Author Share Posted March 2, 2015 (edited) Okay so I'm gonna try to figure this out myself. I found in AdminAttributeGeneratorController.php is where I can modify the reference. 'reference' => pSQL($_POST['reference']), So I got the product attribute id, but how can i convert from id to name from attribute_lang.id_attribute to attribute_lang.name so i can add to the reference the color name? Edited March 2, 2015 by zeki893 (see edit history) Link to comment Share on other sites More sharing options...
zeki893 Posted March 2, 2015 Author Share Posted March 2, 2015 Actually hacked a way to get this working. So if anybody needs help with creating unique product reference IDs this will save you tons of time especially for posting combination products with 8 different colors. Super useful for posting on Amazon using the Amazon module since amazon requires unique reference ID. http://itheadaches.com/prestashop-create-unique-reference-id-product-combinations-generator/ Link to comment Share on other sites More sharing options...
sunshinevapedotcom Posted April 26, 2015 Share Posted April 26, 2015 what version prestashop is this running on ? Link to comment Share on other sites More sharing options...
nathanielleee Posted August 17, 2016 Share Posted August 17, 2016 Actually hacked a way to get this working. So if anybody needs help with creating unique product reference IDs this will save you tons of time especially for posting combination products with 8 different colors. Super useful for posting on Amazon using the Amazon module since amazon requires unique reference ID. http://itheadaches.com/prestashop-create-unique-reference-id-product-combinations-generator/ I implemented this but still no reference is made when i update the combinations Link to comment Share on other sites More sharing options...
kiseed Posted October 26, 2016 Share Posted October 26, 2016 After struggling with the problem, finally I found the error on zeki893's solution. Apparently he didn't use the usual table prefix ps_ so just replacing: $sqltest = 'SELECT * FROM `attribute_lang` WHERE `id_attribute` = '. $attribute .' LIMIT 0 , 1'; for: $sqltest = 'SELECT * FROM `ps_attribute_lang` WHERE `id_attribute` = '. $attribute .' LIMIT 0 , 1'; worked for me 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