Load items into Cart via URL

  • Winston Baccus
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 1 month ago #132237 by Winston Baccus
Load items into Cart via URL was created by Winston Baccus
I'm building out a tool to make sorting through events easier for our summer camps registration in RSForms and I'd like to pass the results of the form directly into a cart.

What is the proper URL scheme to do this?

I've tried view-cart?task=cart.add_cart&id=1379&id=1426 but that only adds 1 and it seems to load the modal into its own window.

Also, as a feature request, this would make the online catalog part easier too. It's not complete, but you can get the idea here:

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

More
6 years 1 month ago #132250 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Load items into Cart via URL
Hello

Try view-cart?task=cart.add_events_to_cart&event_ids=1379,1426

Also, you will need to modify code in the file components/com_eventbooking/controller/cart.php, line 75:
Code:
$eventIds = $this->input->post->getString('event_ids');

To
Code:
$eventIds = $this->input->getString('event_ids');

to have it works

Tuan

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

Moderators: Tuan Pham Ngoc