core- Posted August 17, 2012 Share Posted August 17, 2012 (edited) Hi My vouchers don't work. When i try to apply a voucher to an order (using a test account), there's a red error report "This discount does not apply to that product category.". But i did mark all categories in "Loyalty Program" module (all levels). I found on http://forge.prestas...owse/PSCFI-3309 that the function "setNumRows" within /classes/CacheFS.php should be replaced by: public function setNumRows($key, $value, $expire = 0) { $this->_setKeys(); if (isset($this->_keysCached[$key.'_nrows'])) return true; $return = $this->set($key.'_nrows', $value, $expire); $this->_writeKeys(); return $return; } But in my 1.4.7.3 the function is already exactly like this ! Also i tried enabling/disabling cache and force compile, to no avail. So i'm out of options, and already let customers know that they can count on reward points.. Any help appreciated. edit: I've found a part of code of Cart.php function: if ($returnErrorNoProductCategory) return Tools::displayError('This discount does not apply to that product category.'); which indicates that no category has been selected, which is as i said, not the case. I have selected ALL categories in the module. Edited August 17, 2012 by core- (see edit history) Link to comment Share on other sites More sharing options...
core- Posted August 17, 2012 Author Share Posted August 17, 2012 It seems that the issue was because at the time the test purchases were placed, all categories weren't enabled for vouchers in reward program module (i've enabled them all only today). After placing a new test purchase, it works ok. Link to comment Share on other sites More sharing options...
El Patron Posted August 17, 2012 Share Posted August 17, 2012 did you by any chance upgrade to the version of ps you are running? if so change your config/coinfig.inc.php line for reporting sql errors to this: define('_PS_DEBUG_SQL_', true); and then run your transaction Link to comment Share on other sites More sharing options...
core- Posted August 17, 2012 Author Share Posted August 17, 2012 Hi elpatron, Our posts crossed each other. I solved the problem, but your suggestion is anyway useful. Thanks btw. are there any news about your module that you've been working on, which should manage different prices for different countries (based on ip addresses) ? Link to comment Share on other sites More sharing options...
core- Posted August 17, 2012 Author Share Posted August 17, 2012 Also i noticed that theer's no option to enter voucher code when customer clicks on checkout, only if reviews the cart. http://forge.prestas...owse/PSCFI-3684 IMO there's no point in such a functionality (it should be improved long time ago, since 1.1), so i'm looking for a way to safely REMOVE "Check out" button. It anyway merely duplicates cart review process. Can i do it in a tpl file? Link to comment Share on other sites More sharing options...
El Patron Posted August 17, 2012 Share Posted August 17, 2012 Also i noticed that theer's no option to enter voucher code when customer clicks on checkout, only if reviews the cart. http://forge.prestas...owse/PSCFI-3684 IMO there's no point in such a functionality (it should be improved long time ago, since 1.1), so i'm looking for a way to safely REMOVE "Check out" button. It anyway merely duplicates cart review process. Can i do it in a tpl file? if you use non 5 step check out (forget the name) the voucher is presented....it would be nice if 5 step check out displayed it...another project for another day..you may be able to copy the one page check out .tpl and controller code into the 5 page check out... fyi the price by country is done with unit testing. works great...one override no core changes... but not in installable 'click click' yet...and I am traveling and hope to finish up the actual module build this or early next week. pm me and I'll advise you when it's ready... 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