Hello,
how can i get an ADD TO CART event? (i'm using AJAX add to cart)
I take a look to https://www.phoca.cz/documents/116-phoc ... evelopment but there are only Joomla View Event.
Thank you very much.
How get ADD TO CART event? (also Joomla or Javascript)
-
- Phoca Professional
- Posts: 118
- Joined: 19 Jan 2022, 19:55
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: How get ADD TO CART event? (also Joomla or Javascript)
Hi, in Phoca Cart there are no Javascript events, only standard Joomla events. But if you needs some Javascript event, you can write it in your site with customized Javascript. Or which event you exactly need? Will it affect JS and browser, or should this be some standard Joomla event which e.g. runs some Joomla plugin?
If you find Phoca extensions useful, please support the project
-
- Phoca Professional
- Posts: 118
- Joined: 19 Jan 2022, 19:55
Re: How get ADD TO CART event? (also Joomla or Javascript)
SOLVED:
not founding anything i made a custom Javascript code to detect when chart is updated
not founding anything i made a custom Javascript code to detect when chart is updated
-
- Phoca Professional
- Posts: 118
- Joined: 19 Jan 2022, 19:55
Re: How get ADD TO CART event? (also Joomla or Javascript)
I made a custom override to turn Joomla System Messages into beautiful toast alerts, in this way i can have a more visible alerts over the rendered Joomla pages; i made fixed alert for WARNING and DANGER messages, and with an autoclose timeout for the INFO and SUCCESS messages.
In this way i can call my javascript function also for AJAX calls, and i have the same graphic design alerts with both standard Joomla Messages and my custom AJAX messages.
About ADD TO CAR event and my Phoca Cart: i was searching for a Phoca Cart event ADD TO CART, but at the end i made a custom JS run by a my custom Joomla plugin to detect #phItemCartBoxCount change (by MutationObserver), and in case of increment (added product) it runs my custom Joomla system alert to show "Add to cart".
So: Solved!
Thank you Jan!
(now i have some problem for product ATTRIBUTES operators --need percentage-- and how force MAIN IMAGE product --in place of ATTRIBUTE IMAGE-- on checkout page and checkout module in gantry menu module)
P.S.: there's a way to help you in developing? (i'm an italian graphic designer with HTML, PHP, CSS and Javascript skills)
In this way i can call my javascript function also for AJAX calls, and i have the same graphic design alerts with both standard Joomla Messages and my custom AJAX messages.
About ADD TO CAR event and my Phoca Cart: i was searching for a Phoca Cart event ADD TO CART, but at the end i made a custom JS run by a my custom Joomla plugin to detect #phItemCartBoxCount change (by MutationObserver), and in case of increment (added product) it runs my custom Joomla system alert to show "Add to cart".
So: Solved!
Thank you Jan!
(now i have some problem for product ATTRIBUTES operators --need percentage-- and how force MAIN IMAGE product --in place of ATTRIBUTE IMAGE-- on checkout page and checkout module in gantry menu module)
P.S.: there's a way to help you in developing? (i'm an italian graphic designer with HTML, PHP, CSS and Javascript skills)
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: How get ADD TO CART event? (also Joomla or Javascript)
Can you write more detailed information? Or are these problems listed in other posts?(now i have some problem for product ATTRIBUTES operators --need percentage-- and how force MAIN IMAGE product --in place of ATTRIBUTE IMAGE-- on checkout page and checkout module in gantry menu module)
If we are speaking about graphics, Phoca Cart just renders standard output - Bootstrap or UIkit. The biggest benefit for Phoca Cart in this sense would be some template which will support Phoca Cart.P.S.: there's a way to help you in developing? (i'm an italian graphic designer with HTML, PHP, CSS and Javascript skills)
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Professional
- Posts: 118
- Joined: 19 Jan 2022, 19:55
Re: How get ADD TO CART event? (also Joomla or Javascript)
Yes, about percentage multiplier it's in another post.Can you write more detailed information? Or are these problems listed in other posts?
Ok, i use only Gantry templates im my productions, let me know how i can contribute.The biggest benefit for Phoca Cart in this sense would be some template which will support Phoca Cart.