Adding custom info to Perch Shop order

  • So I want to be able to add some custom text information to orders in Perch Shop. It is on a password-less customer creation and will always involve a single item.

    I've investigated the cart-property option but this seems to only work with gateways that are processed by Perch. In my case, Stripe is the main gateway with Paypal as a second option (Paypal will process the cart-property but as Drew confirmed in another thread, the Stripe option will not). Has anyone managed to get this working with these options or even just with Stripe? Also the Paypal version of using cart-property, which does register in the database, doesn't show in the additional information on the order admin page.…ty-in-stripe-payment-form

    I've also looked into adding the information into a faux telephone field as per this thread:…-new-perch-shop-customers

    This uses the addition of fields into customer.html template and customer_create_passwordless.html. However, the original register page using the second template doesn't register the additional field or at least it doesn't show on the checkout confirmation screen. If I use an update template for the address with the additional field - edit.html - it will ADD the information and show on the checkout confirmation screen but then won't show in the admin for the eventual order.

    I know that item customisations is on the roadmap but I would be more than happy with something that works just for the cart.

    So, has anyone found a workaround for adding a few words to an order either using cart-property and being able to use stripe or as an additional customer information field during register? Or any other method?

  • drewm

    Approved the thread.
  • Hi,

    The value of cart properties are recorded by Perch Shop and you should be able to see their values via the control panel.

    In the forum post cart-property in stripe payment form you're linking to, Daniel is attempting to add the cart property field directly to the Strip payment form. It is not possible to do it this way.

    I don't think you can handle both tasks (recording the cart property from a form and payment) simultaneously. These need to be 2 different steps.

    So you can set up a form and have the customer fill a cart property field first. Then at a later step the customer can complete the payment with any gateway you want (Stripe included).

  • Ah that's very helpful and clear. Thank you.

    So I put this

    1. <perch:input type="textarea" id="personal_message" label="Personal Message" cart-property="personal_msg" />

    in the initial perch:form cart before the checkout/registration stage. Now, I got the cart-property to register in the database and admin just once but cannot get it to work again.

    Sometimes I get 'personal_msg:null' in the database and similar in the order admin. Why would it register the field but not the value?

    It is outside of the perch:cartitems in the form is there any other rule I've missed? It's not confined to certain field types is it?

    I discovered that I can programmatically add the cart property with perch_shop_set_cart_property('change_details', 'different message'); (from another of Hussein's posts) and it works consistently, so I'm pursuing that course.