Shop Gift Option / Shop Forms
Hi there!
Are there any suggested best practices for adding a gift message field / form to the checkout process?
I guess the primary requirement is that the contents of the form are posted to / associated with the particular order.
Thank you greatly!
Any field with the
cart-property
attribute set show be saved with the order.Thanks Drew!
Can the message be displayed at the order review step? I've not had luck with
<perch:shop id="gift_message" />
I've also not completed a full order submission yet, with payment etc. Would the content of the form only post when the entire order is processed? I've not located my test gift message submissions anywhere.
I don't think there's a way to display cart properties back. If that's a requirement then I'm not sure we have a solution for it right now.
The cart properties can be set from any shop form.
Okay, thanks Drew.
I've notice that some shops do this in lieu of actually displaying the gift message back:
The issue that I'm having now is with type="textarea" in my message form... I added
app="perch_forms perch_shop"
so that I can view the submissions in the forms app for now. Even when left blank, the textarea is being treated as a form submission with no contents. And in turn, is causingif (perch_shop_cart_has_property('gift_message'))
to be TRUE, whether blank, or populated.Is there a way to submit this single form without interpreting blank textarea as content?
This is my template:
Are you saying
perch_shop_cart_has_property()
is returning true even if the property has no value?Yes, but it only seems to be happening with text fields. The text portion of the form posts as if there is content even when blank, no (apparent) value; and the textarea always returns true for
perch_shop_cart_has_property()
--- when a value has been entered as well as when it's left blank.I'm not having this issue with the checkbox input that's a part of the same form. When it's checked I get a "true," and when it's not checked I get a "false."
I'll take a look at it!
You can actually use
perch_shop_get_cart_property()
to get a property.Thanks Drew!
perch_shop_get_cart_property()
even before the order is complete? I doesn't seem to return anything in the review step.Yes, should be fine. Are you passing in the property you want to get?
Also I hope 1.0.2 should fix your textarea issue - let me know.
Ah---
I was doing this---which does not work:
But this works:
One other little thing happening---
I have a checkbox saying "check if you'd like to conceal the invoice for a gift" (template is above)
If the customer selects this, it returns "true" as expected. However, if they go back to revise their selection to not-checked, and then proceed to order review again, it does not update the section to "false." (n.b. I'm using my beloved
next
attribute to move through the checkout flow)Once they've gone gift, there's no going back!
And funny enough, textarea is not such an issue with
perch_shop_get_cart_property()
because blank space just shows up blank. It's still a problem if you want to test for anelse
condition because it is always returning 'true' -- I'll check it out after the next release! ...... BUT all this is to say: that the textarea value is updating properly when I go back and change the message, the checkbox is not.Check the release and let me know if these are still issues.
Will do, thanks Drew!!
Hi Drew,
I'm on Shop 1.0.6 and still running into this issue:
When "gift_invoice" (checkbox) and "gift message" (textarea) are selected during the gift step they cannot be revised prior to checkout when the customer goes back to the gift step and resubmits as blank selections.
That is to say "once you go gift, you [still] never go back" ---[can I say that enough? apparently not!]
Cheers Drew.
It sounds like we're still having issues unsetting a cart property. I'll take a look into it.
Hi Drew, I saw that Mike Harrison brought up changing cart properties in another thread. I have:
and in
gift_form.html
The cart properties are not resetting when the customer goes back to this step in the checkout flow. Just wondering if this is still an open issue, or does your reply to Mike have some bearing here?----
" In Shop 1.0.6 you can do this:
"
It's in 1.0.7, not 1.0.6 - my mistake.
Hi Drew, I'm on 1.0.7 (cool!) and the textarea cart property is resetting as expected.
The cart properties set with a checkbox are still not resetting when I go back and change the selection during my checkout flow.
Are you changing it to a new positive value, or removing it?