1

I have 2 separate shops on 2 different servers. One has coupon codes which the other should read and put in a mail which is sent to the customer. The coupon will be used in the store that hsa them in the DB.

What would be the best way to let the 2 interact with each other? Some sort of API maybe?

Thanks!

1 Answer 1

3

In order for a coupon to work it has to be set in the database of the store that is using it.
My suggestion is to sync your coupon codes between the stores.
Unfortunately there is no API for the coupon codes, so you must create your own way of copying a coupon from one store to an other.
You can find here the code that you can use to create a coupon code via php code, but you will need a way to expose to the second store, the coupons from the first one. Just make sure that you won't make them public.

2
  • Yes, the coupons will be used in the store that has them. The other store just puts them in a mail.
    – Arnie
    Commented Feb 11, 2016 at 8:18
  • So it might be an issue of reading values from a database on another server.
    – Arnie
    Commented Feb 11, 2016 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.