Q&A: Gift card generation error "property discount quantity per user is not valid"

PrestaShop user question

Hey there, I'm trying to use this gift voucher module app. 
For some reason when I switch the order to delivered which is what I clicked to send the voucher I get this error: 
[PrestaShopException] Property Discount->quantity_per_user is not valid at line 909 in file classes/ObjectModel.php 904. } 905. 906. $message = $this->validateField($field, $this->$field); 907. if ($message !== true) { 908. if ($die) { 909. throw new PrestaShopException($message); 910. } 911. return $error_return ? $message : false; 912. } 913. } 914. ObjectModelCore->validateFields - [line 246 - classes/ObjectModel.php] ObjectModelCore->getFields - [line 487 - classes/ObjectModel.php] ObjectModelCore->add - [line 129 - classes/CartRule.php] - [2 Arguments] CartRuleCore->add - [line 152 - classes/Discount.php] - [2 Arguments] DiscountCore->add - [line 866 - modules/giftcertificate/lib/voucherengine/engine.php] giftcertificateVoucherEngine::AddVoucherCode - [line 1170 - modules/giftcertificate/giftcertificate.php] - [1 Arguments] giftcertificate->hookactionOrderStatusUpdate - [line 587 - classes/Hook.php] - [1 Arguments] HookCore::coreCallHook - [line 542 - classes/Hook.php] - [3 Arguments] HookCore::exec - [line 105 - classes/order/OrderHistory.php] - [7 Arguments] OrderHistoryCore->changeIdOrderState - [line 531 - controllers/admin/AdminOrdersController.php] - [3 Arguments] AdminOrdersControllerCore->postProcess - [line 178 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 58 - admin/index.php]

PrestaShop expert answer

Hello,
please check configuration of the gift card code value. To do this please follow these steps:
  1. log in to your shop back office
  2. go to modules > modules section and open "gift certificate" module configuration page
  3. go to list of gift cards you created
  4. hit button to configure discount near the gift card you created (or giftcards if you've got several) screenshot for reference below:
  5. verify settings for options "Total available" and "total available for each user".
    There is a suggestion
    Please note that settings here are related to one unique voucher code that module will generate. Suggested values for fields below: Total available: 1, Total available for each user: 1
    This means that customer that will receive one unique voucher will have possibility to use it during checkout only one time (as long as you will use suggested values)
These fields can't be empty (!) all fields must be filled out.
Videos below shows explanation about configuration of the coupon codes. It is worth to follow all suggestions, otherwse coupons may not work properly or generate some issues (like you have)

Please fill out each available field - do not leave fields empty. Otherwise module will not generate coupon codes or these codes will not work properly. Below you can find links to YouTube videos where you can find more informations about this voucher code configuration tool.

Video description of advanced voucher configuration tool
https://www.youtube.com/watch?v=cyqsBQkS_fU

General settings
https://www.youtube.com/watch?v=ubg60yWuLMA

Conditions settings
https://www.youtube.com/watch?v=2L6DYcTo5n0

Actions settings
https://www.youtube.com/watch?v=JV4JXfYMVxY
Share on Google Plus

About VEKIA

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a comment