Skip to main content

Pulling URL of purchased product

More
10 years 11 months ago #218251 by brentwilliams2
The majority of purchases made on my site are individual products, and I would like to include the social share buttons on the thank you page (after_end) tying back to the product they purchased. Is it possible to find out if the purchase was for an individual product, and if so, pull the URL for that product?

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #218275 by nicolas
Hi,

There is no option to do that.
You'll have to edit the file "after_end" of the view "checkout" via the menu Display>Views to add custom code for that.
If you're a developer, it won't be a problem, although it's not just a few lines of code. You'll have to first get the order_id from the user state, and then load the order data:
www.hikashop.com/forum/4-how-to/68733-ge...id-in-after-end.html
Then, you can look at $order->products to identify the products of the order and add your share button custom HTML/JS/PHP based on that.

Please Log in or Create an account to join the conversation.

Time to create page: 0.144 seconds
Powered by Kunena Forum