VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: EvanGR on July 05, 2021, 08:34:21 AM

Title: Include metadata in orders
Post by: EvanGR on July 05, 2021, 08:34:21 AM
Hello,

I want to save some hidden metadata along with each order.
For example, I want to know if an order was done via a referral/affiliate link. (and be able to view that in the VM Orders page).

Any tips on this appreciated. Thanks!
Title: Re: Include metadata in orders
Post by: pinochico on July 05, 2021, 14:42:44 PM
I use ShopTracker plugin from Rupostel
Title: Re: Include metadata in orders
Post by: EvanGR on July 06, 2021, 08:57:04 AM
Thank you.

I have this plugin enabled, but I don't see any referral info saved with the orders.

I think I need a custom solution...

1) I can store the referral data (and other analytics data) in user's local storage.
2) When completing the order, I want to save it with the order, so I can see it in the VM backend, in the Order page.

it's the step 2 I am not sure how to do.
Title: Re: Include metadata in orders
Post by: pinochico on July 06, 2021, 11:14:01 AM
QuoteI want to save it with the order, so I can see it in the VM backend, in the Order page

Yes,
I send you order detail with saved track referral URL - do you remember?
I see this info in order detail in admin and in DB - look at the picture.

Why do you write again and again, if this function is ok?