Page 1 of 1
How get ADD TO CART event? (also Joomla or Javascript)
Posted: 14 Jan 2023, 21:08
by morphinestyle
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.
Re: How get ADD TO CART event? (also Joomla or Javascript)
Posted: 17 Jan 2023, 18:01
by Jan
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?
Re: How get ADD TO CART event? (also Joomla or Javascript)
Posted: 17 Jan 2023, 21:59
by morphinestyle
SOLVED:
not founding anything
i made a custom Javascript code to detect when chart is updated
Re: How get ADD TO CART event? (also Joomla or Javascript)
Posted: 18 Jan 2023, 13:01
by morphinestyle
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)
Re: How get ADD TO CART event? (also Joomla or Javascript)
Posted: 18 Jan 2023, 15:26
by 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)
Can you write more detailed information? Or are these problems listed in other posts?
P.S.: there's a way to help you in developing? (i'm an italian graphic designer with HTML, PHP, CSS and Javascript skills)
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.
Thank you, Jan
Re: How get ADD TO CART event? (also Joomla or Javascript)
Posted: 18 Jan 2023, 17:30
by morphinestyle
Can you write more detailed information? Or are these problems listed in other posts?
Yes, about percentage multiplier it's in another post.
The biggest benefit for Phoca Cart in this sense would be some template which will support Phoca Cart.
Ok, i use only Gantry templates im my productions, let me know how i can contribute.