Gift Voucher problems

Phoca Cart - complex e-commerce extension
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 268
Joined: 07 Nov 2018, 14:55

Gift Voucher problems

Post by Nidzo »

I followed YouTube video tutorial for setting Gift Voucher but something does not work.
1. I created Product with Product Type = Gift Voucher
2. I set Attributes for Voucher Values. I used List (Select) option with values 500, 750 and 1000
3. I set additional attributes with Type Gift and created Receipent name, Recepient e-mail, Sender name and message.
4. In products Publishing Option in Gift Voucher Type I set Voucher image and Gift Expiration Date (left name and description blank because it is on image)
5. In order status (Confirmed is default in my case) I activated Gift Voucher Options - Send email to buyer and recipient, message for both etc.
Everything in frontend looks nice:
Image

Problem starts...
When I click on Confirm order and new page loads with Stripe Checkout for Phoca Cart I get alert "Field 'valid_to' doesn't have a default value". I can pay normaly (Currently I use test mode for Stripe) and after successfuly payment I confirmation e-mail but the Gift Recepient does not get e-mail with voucher.

This behaviour is only for Gift Vouchers. Phoca Cart Logs does not give me anything. :shock:

Joomla 5.0.3
Phoca Cart 5.0.0Beta47
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47891
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Gift Voucher problems

Post by Jan »

Hi, when you test it, do you get the same problem e.g. when you set some "cash on delivery" payment method and e.g. directly in pending status you set the emailing of gift? (testing now, everything is OK with emails).

Did you install the version 5 or upgrade from Joomla 4 version. Because there can be obsolete column for valid_to field in database.

Table:
phocacart_coupns

column:
valid_to

The structure should be:

Image

Check this table for data, if there are stored the coupons:

- if not, this problem can influence sending emails
- if yes (there are data of gift coupons, then the problem (valid_to) should not cause not sending of emails). Then you should check the order status if it is properly set (email of gift vouchers) :idea:

Jan
If you find Phoca extensions useful, please support the project
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 268
Joined: 07 Nov 2018, 14:55

Re: Gift Voucher problems

Post by Nidzo »

It is fresh installed Joomla 5.0.3 on MariaDB 10.6.15 and PHP 8.3.4 with Phoca Cart 5 Beta44 and updated to 5.0.0Beta47
I have those values in phocacart_coupons table

Image

Stripe payment but I get the same: :x

Image

My last step is to ask for help on the forum, before try everything I know but I'm out of ideas now :idea:
lpatrick
Phoca Enthusiast
Phoca Enthusiast
Posts: 91
Joined: 13 Feb 2024, 17:00

Re: Gift Voucher problems

Post by lpatrick »

Nidzo

Did you see Jan's suggestions below his image? Because you didn't seem to confirm if there are coupons in the table.
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 268
Joined: 07 Nov 2018, 14:55

Re: Gift Voucher problems

Post by Nidzo »

lpatric thanks. I followed this tutorial https://www.youtube.com/watch?v=YRdZO9EGJdA
Coupons SQL table is empty. Do I have to create one or?

Also there is no coupons in backend
Image
lpatrick
Phoca Enthusiast
Phoca Enthusiast
Posts: 91
Joined: 13 Feb 2024, 17:00

Re: Gift Voucher problems

Post by lpatrick »

Nidzo

I think you meant this tutorial https://www.youtube.com/watch?v=mmk8br2OhAs
I will try tomorrow on my test system, it's too late now (I'm CET summer time).

Unless someone else knows/answers.
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 268
Joined: 07 Nov 2018, 14:55

Re: Gift Voucher problems

Post by Nidzo »

I think you meant this tutorial https://www.youtube.com/watch?v=mmk8br2OhAs
I will try tomorrow on my test system, it's too late now (I'm CET summer time).

Unless someone else knows/answers.

Yes, I meant that tutorial :)
Thanks!
lpatrick
Phoca Enthusiast
Phoca Enthusiast
Posts: 91
Joined: 13 Feb 2024, 17:00

Re: Gift Voucher problems (Beta 47)

Post by lpatrick »

Nidzo
I tried with Cash on Delivery because I don't have Stripe installed. Maybe it's a test you could do also, to see if it's related to the PCP.
I also don't have email active but after changing the order from Pending to Completed manually, I get a coupon in my table and in the Phoca Cart GUI.

Things that could be double checked:
- Product - General Options - Product type = Gift Voucher (on the right)
- Product - Attributes: Value (Image Select), required with a value block for each Gift voucher value, one of them the Default
- Product - Attributes: Gift (Gift Type), not required, with as values all the different fields each of the correct Type (Gift - Name of Recipient, etc)
- Product - Publishing Options (the Product Type of the video is on the General tab now, see above). For each card the Gift Expiration date

If you check your Gift Card/voucher product in the _phocacart_products table, check the contents of the gift_types column. It should be something like this:

Code: Select all

{"gift_types0":{"id":"0","title":"Happy Valentine","image":"images\/phocacartproducts\/BabyFood\/valentine-5954177_960_720.jpg#joomlaImage:\/\/local-images\/phocacartproducts\/BabyFood\/valentine-5954177_960_720.jpg?width=960&height=641","image_small":"","description":"<p>Happy Valentines Gift Voucher<\/p>","expiration_date":"2024-12-31 11:27:12","class_name":""},"gift_types1":{"id":"0","title":"Present","image":"images\/phocacartproducts\/BabyFood\/background-3018089_960_720.jpg#joomlaImage:\/\/local-images\/phocacartproducts\/BabyFood\/background-3018089_960_720.jpg?width=960&height=560","image_small":"","description":"","expiration_date":"2024-12-31 11:27:12","class_name":""}}
Since you have an error on valid_to, maybe the expiration_date isn't set on your test?

If all that is OK, then I don't have a clue either, sorry.
lpatrick
Phoca Enthusiast
Phoca Enthusiast
Posts: 91
Joined: 13 Feb 2024, 17:00

Re: Gift Voucher problems

Post by lpatrick »

While doing this test, I saw my Gift 'attributes' all showed their extra price (+ € 0.00) while ordering.

I don't see them in your image. Did you do anything special for that?
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 268
Joined: 07 Nov 2018, 14:55

Re: Gift Voucher problems

Post by Nidzo »

@lpatrick I checked all you wrote but and nothing worked. Then I installed fresh Joomla 5.0.3 and Phoca Cart latest beta from phoca.cz download sections, nothing else, and I get the same result:

Image
While doing this test, I saw my Gift 'attributes' all showed their extra price (+ € 0.00) while ordering.

I don't see them in your image. Did you do anything special for that?
In Phoca Cart options > Display > Attribute Price

Image
Post Reply