Ah yes thanks but I needed that for selling the images in my project.
A larger image resolution comes at an extra cost.
So it seems it's a general setting and that means we can't do vouchers in our shop or people need to ignore that.
Seems this gift voucher functionality stretches the original Attribute functionality a little ...
With regard to your testing, did you try Cash on Delivery?
Gift Voucher problems
- Nidzo
- Phoca Professional
- Posts: 387
- Joined: 07 Nov 2018, 14:55
Re: Gift Voucher problems
Problem is that main function of gift voucher system does not work. Receiver should receive email with voucher and code but that is not the case. In YouTube tutorial it works well but in latest Betas does not work.
Yes, I tried with Cash on delivery too. No luck.
I don't know is it related but this pops up after first order on fresh installation. After updating database structure problem with voucher persists.
EDIT: The first Beta version that gives error is Beta21. Versions prior gives another one
Yes, I tried with Cash on delivery too. No luck.
I don't know is it related but this pops up after first order on fresh installation. After updating database structure problem with voucher persists.
EDIT: The first Beta version that gives error is Beta21. Versions prior gives another one
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Gift Voucher problems
Hi, the system needs to store the information about newly ordered coupon in database, and then it can send it per email. If the info is not stored in database, then it will be not sent per email. And this error: "Field 'valid_to' doesn't have a default value" can prevent from storing the coupon into the database.
So the main problem to solve here is to check the structure of the database, so the "valid_to" error does not occur.
Jan
So the main problem to solve here is to check the structure of the database, so the "valid_to" error does not occur.
Jan
If you find Phoca extensions useful, please support the project
- Nidzo
- Phoca Professional
- Posts: 387
- Joined: 07 Nov 2018, 14:55
Re: Gift Voucher problems
What is the version of Phoca Cart used in this tutorial? And why gift voucher does not work on latest betas?
https://www.youtube.com/watch?v=mmk8br2OhAs
https://www.youtube.com/watch?v=mmk8br2OhAs
-
- Phoca Enthusiast
- Posts: 94
- Joined: 13 Feb 2024, 17:00
Re: Gift Voucher problems
I think that tutorial was for version 3.5.7 (see the video at the start).
It did work for me in those new betas of 5, Nidzo.
Maybe you can look in the browser console the moment you place the order. There could be information about what DB input query goes wrong.
Do you want screenshots of my tests?
It did work for me in those new betas of 5, Nidzo.
Maybe you can look in the browser console the moment you place the order. There could be information about what DB input query goes wrong.
Do you want screenshots of my tests?
- Nidzo
- Phoca Professional
- Posts: 387
- Joined: 07 Nov 2018, 14:55
Re: Gift Voucher problems
Yes please. I would be grateful!
-
- Phoca Enthusiast
- Posts: 94
- Joined: 13 Feb 2024, 17:00
Re: Gift Voucher problems
So I created a replica of my previous gift card so I'd be sure not to forget what I did exactly.
Here are all the images. The names of the files explain it all.
I'm (kind of) lazy so I did only voucher two values and two publishing options and I didn't even bother creating/selecting small images.
https://imgur.com/a/qE6Z9iS
(Be sure it loads all images, I needed to click to show the final 2)
Here are all the images. The names of the files explain it all.
I'm (kind of) lazy so I did only voucher two values and two publishing options and I didn't even bother creating/selecting small images.
https://imgur.com/a/qE6Z9iS
(Be sure it loads all images, I needed to click to show the final 2)
- Nidzo
- Phoca Professional
- Posts: 387
- Joined: 07 Nov 2018, 14:55
Re: Gift Voucher problems
Thank you lpatrick for your effort. I did exactly like you before and tried again but problem persist.
What should be default value?
"Field 'valid_to' doesn't have a default value"
I searched "valid_to" string in Phoca Cart files. These are results :
Search "valid_to" (89 hits in 26 files of 1287 searched) in administrator\components\com_phocacart
Search "valid_to" (5 hits in 2 files of 313 searched) in components\com_phocacart
Code bellow is directly related to Gift Voucher:
Also I think I found mistype in string VALLID where there are 2 L letters:
What should be default value?
"Field 'valid_to' doesn't have a default value"
I searched "valid_to" string in Phoca Cart files. These are results :
Search "valid_to" (89 hits in 26 files of 1287 searched) in administrator\components\com_phocacart
Search "valid_to" (5 hits in 2 files of 313 searched) in components\com_phocacart
Code bellow is directly related to Gift Voucher:
Code: Select all
\components\com_phocacart\layouts\attribute_options_gift.php (1 hit)
Line 260: $d2['valid_to'] = HTMLHelper::date($defaultDate, Text::_('DATE_FORMAT_LC3'));
\components\com_phocacart\layouts\gift_voucher.php (4 hits)
Line 179: if ($d['valid_to'] != '') {
Line 180: echo '<div'.$s['ph-gift-voucher-date-to'].' class="'.$c['ph-gift-voucher-date-to'].'">'.Text::_('COM_PHOCACART_VALID_TILL').': <span class="phAOGiftDate">'.$d['valid_to'].'</span></div>'. "\n";
Line 284: if ($d['valid_to'] != '') {
Line 285: echo '<div'.$s['ph-gift-voucher-date-to'].' class="'.$c['ph-gift-voucher-date-to'].'">'.Text::_('COM_PHOCACART_VALID_TILL').': <span class="phAOGiftDate">'.$d['valid_to'].'</span></div>'. "\n";
Code: Select all
administrator\components\com_phocacart\views\phocacartcoupons\view.html.php (1 hit)
Line 96: 'a.valid_to' => Text::_($this->t['l'] . '_[b]VALLID[/b]_TO'),
administrator\components\com_phocacart\views\phocacartdiscounts\view.html.php (1 hit)
Line 89: 'a.valid_to' => Text::_($this->t['l'] . '_[b]VALLID[/b]_TO'),
-
- Phoca Enthusiast
- Posts: 94
- Joined: 13 Feb 2024, 17:00
Re: Gift Voucher problems
The 'Valid to' should come from the Gift Expiration Date you set (and in your initial post you say you set it to 09 June 2024).
Did you type in the date or did you use the date selection gadget?
What did you set as Timezone for your admin user?
What do you see in the order confirmation overview? What date is set there and what is the Gift type number (0?)?
Did you type in the date or did you use the date selection gadget?
What did you set as Timezone for your admin user?
What do you see in the order confirmation overview? What date is set there and what is the Gift type number (0?)?
-
- Phoca Enthusiast
- Posts: 94
- Joined: 13 Feb 2024, 17:00
Re: Gift Voucher problems
Yes I think those are wrong but as far as I can see, they would only be related to sorting and not to the problem you're having.Nidzo wrote: ↑16 Apr 2024, 21:20 Also I think I found mistype in string VALLID where there are 2 L letters:Code: Select all
administrator\components\com_phocacart\views\phocacartcoupons\view.html.php (1 hit) Line 96: 'a.valid_to' => Text::_($this->t['l'] . '_[b]VALLID[/b]_TO'), administrator\components\com_phocacart\views\phocacartdiscounts\view.html.php (1 hit) Line 89: 'a.valid_to' => Text::_($this->t['l'] . '_[b]VALLID[/b]_TO'),