Pulling URL of purchased product

  • Posts: 78
  • Thank you received: 5
  • Hikashop Business
9 years 1 month ago #218251

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.

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
9 years 1 month ago #218275

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.032 seconds
Powered by Kunena Forum