WingTsun247 Posted January 30, 2015 Share Posted January 30, 2015 (edited) This issue was solved. Thanks to: okom3pom I have made a script (plugin), which generates XML Export files for specific shops. Everything is fine with that. The problem is, I need to SELECT only products, which are NOT DISABLED. Currently it SELECTS ALL Products from the DB. This is how I select Products: This is whrere I need to make changes, to make it select only enabled ones. $product = Product::getProducts((int)Context::getContext()->language->id, 0, 0, 'id_product', 'ASC'); After this I do a foreach loop like this: foreach($product as $key => $data) { The other way would be to do smth like this: if($data['IsDisabledOrSmth']) { // do nothing.. } else { // let my script to go further.. } Note! Everything, other than Selecting only the ENABLED products are working fine in the script. Thank you for your time, WingTsun. Edited January 30, 2015 by WingTsun247 (see edit history) Link to comment Share on other sites More sharing options...
WingTsun247 Posted January 30, 2015 Author Share Posted January 30, 2015 Thank you. I did the first changes you posted, it didnt work. After reloading the page, I noticed you have editet the code. Now I tried the second one, and it works now! So, huge thanks for the help. Thank you, WingTsun. 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