Hi there!
I searched the whole Forum for an answer ut i couldnt find one😟
So here is my question:
is it possible with chronoforms to add some articles in joomla into something like a shopping cart?
Background: one of my client is renting some products. every product got its own article. i want to have one single form below every product / article so the user can add the articles with renting duration into the cart. after clicking on the cart chronoforms have to send out an email without payment process, just an email...
how to do that?
using CF5 and Joomla 2.5
Thanks for support!
Robert
Hi Ademma,
That should be quite straightforward. You will need to capture the id of the product on the current page. If that, or the product name, is in the page URL then you can grab the url and add that to your form in a hidden input.
Bob
Hi Bob,
I would like to create some sort of shopping cart for my website, too. The user is supposed to read about an event and then choose a date, where he or she would like too attend this event. The datelist is actually a form. After submitting the form should send the id/the event-number to my 'shopping cart' or the first page in my chronoform-form. There the user should have the ability to enter his or her address etc and event number and address would be sent as an email to my customer.
1.After reading the reply above, could you please tell me how the URL or action-parameter from the form outside of chronoforms should look like?
2. I added a hidden input-field to my first page in my chronoform-form, but I don‘t know what to type in and where.
using CF5 and Joomla 2.5
Thanks for support!
teazmo
Hi teazmo,
I would give each event a unique ID - a short random string. then include that in the URL from the first form e.g. &event_id=xx99xx
You can then use this to look up the event details in the form.
Bob
Hi Bob,
Thansk for your answer. Actually I used a unique ID and my URL (action-parameter in first form) : 'index.php?option=chronoforms5&chronoform=mail&number=xx99xx'
1. Is this correct?
2. What do I have to do inside of Chronoforms to fetch that information (number)?
Thanks
Hi Ademma,
If you add a Debugger action to the form ON Load event you'll see that it is automatically added to the $form->data array
Bob
Hi Bob,
I added the Debugger to the form and my event number showed up – thanks for the hint. Now I would like the first page of my shopping cart to be a list of all event numbers chosen – like a real shopping cart. So that after the user has chosen one event he can return to the event pages and add another event to the 'shopping cart', which means his or her event items have to be collected somehow. So far my original event numbers are overwritten by the new numbers chosen. What do I have to do to collect all numbers? And how can I put session dat into a form?
using CF5 and Joomla 2.5. Thanks, teazmo
Hi teazmo,
I would use some custom PHP to save the selected events into the User Session - probably as an array of values.
ChronoForms has some of this built in if you add the values to a sub-array like $form->data['selected_events'][]
Bob
Hi Bob,
Thanks for the support! I have tested your session code and it works very well! 😀 But instead of the OnSubmit event I've used the Onload event to fetch the session infos right away. My question: How can I remove saved items inside of the form (like you said in the last line)?
teazmo
Hi Robert,
Hmmm . . . I think I would use a form that creates a list of what is in the cart and has a delete link for each item. That link would point to a form event i.e. index.php?option=com_chronoforms5&chronoform=form_name&event=delete&item_id=999
Then in that form event you'd get the session info back again, remove the item with id=9999 resave the cart data and then re-load the list display.
Bob
PS You could also do this with ChronoConnectivity but a simple list in a ChronoForm is probably easier.
Hi Bob,
Today i used a form that creates a list of all event items. Actually I put form-tags around the event(output) and added an input-button 'delete' to each item. Somehow my custom form doesn‘t work. Using Firebug I can‘t see any form except the chronoform-form. Are custom forms not allowed? Or do I have to use two HTML render form in the Setup? How can one form point to one event and another form to another event?
Thanks,
teazmo
Hi teazmo,
I really can't work out what you are describing here.
You can include custom code in a form using a Custom Element element. What you can't do - because it is illegal HTML is to nest one <form> tags inside another <form> tag - then neither form will work.
Bob
Hi teazmo,
I think that this depends where the main cart record is. If it is the list on the page then you can use local JavaScript to remove that line item (or possibly just disable it in case the user whats to change their mind). Then the cart will be updated when the form is submitted.
If the main record is on the server then I think you have to do that using Ajax to call back to the server to record the deletion combined with some JavaScript to remove the deleted item form display once the Ajax call has successfully completed.
Bob
Bob