Auto add product in cart

  • Posts: 151
  • Thank you received: 9
11 years 7 months ago #95795

Hi guys,

Is there a way to automatically add an extra product to the cart when a customer adds a certain product to it?
And is there a way to make this auto-added product, a time-extension for the download?

Example: when they select a download that they can buy, I want to offer a backup-service, which is in fact an extension of the time that they have to download it. Normally this is 30 days and I want to offer a 1 year download period, in case their PC crashes or whatever.

Any ideas?

Kind regards,
Maurice

Last edit: 11 years 7 months ago by Maurice.

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

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #95908

Hi,

There is no option to do that.

Regarding the first point, you can create a hikashop plugin implementing onAfterCartUpdate and using the code sample to add a product to the cart. We have more information for developers on all that here:
www.hikashop.com/en/support/documentatio...r-documentation.html

Regarding the second point however, you can't change the download period of a product file per user/order as the period limitation is the same for everyone.
However, if you don't set any restriction in the file, you can create a hikashop plugin implementing the onBeforeDownloadFile trigger and enforcing yourself the limitation period by calculating it based on the orders of the user logged in:
www.hikashop.com/en/support/documentatio...onBeforeDownloadFile

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

Time to create page: 0.051 seconds
Powered by Kunena Forum