#riptired

1 messages · Page 1 of 1 (latest)

buoyant impBOT
slate nest
#

Hi, can you reword this please? You want to share a promo code that has $0 discount?

timber axle
#

Yeah

#

I want to build a promo code that applies to a customers second order

#

so I want to allow them to enter a code that applies a 0% discount to their first order (or some kind of referral code) so that i can send them the actual promo code for their second order

#

i.e. Customer hears about product in youtube video. Youtube video has a promo code "VIDEO10" for $10 off your second order of $50 or more. Now when a customer makes their first order, they should enter code VIDEO10 to be eligible for the promo. VIDEO10 gives the customer no discount on the first order but makes them eligible for a promo on their second order

slate nest
timber axle
#

Ah great this works

#

thanks

slate nest
#

Happy to help!

timber axle
#

Just to be sure

#

this custom field data will also show up in the checkout session completed event right

slate nest
#

I believe so, let me test this

#

Just confirmed, I do see the following on my checkout.session.completed event.

"custom_fields": []

timber axle
#

great

#

thanks!

slate nest
#

Sure!

timber axle
#

can you provide an example of how to use the customFields type in js?

slate nest
timber axle
#

Yeah i am doing that but it doesn't show up in my checkout session

#

this is what my array of hashes looks like

      custom_fields: [{
        key: 'company',
        label : {type : 'custom', custom: 'company name'},
        type: 'text'
      }],
slate nest
#

can you share your request id with me please?

#

I just copy pasted your code to my environment and it's working fine:

#

I changed the key

#

Copy/ paste of the code you shared

#

@timber axle if you share your request id, I can further look

timber axle
#

Hmm

#

was running this in localhost, let me try on a staging env

slate nest
#

Let me know if you run into issues

#

Are you still here? @timber axle

timber axle
#

yeah, testing

slate nest
#

Great!

buoyant impBOT
timber axle
#

Figured it out