when you use js to trigger cart slide how do you f...
# replo-help
o
when you use js to trigger cart slide how do you fix all the following buttons from ceasing to work?
p
Hi there, Ahmed here from Replo team. you need to add the JS code to trigger the cart to all the buttons that you want to trigger the cart via the run javascript on click interaction.
o
I only want it to one of them the rest are scroll to hashmark
p
Just add it to the button that you want it to trigger the cart, and you can leave the rest as scroll to URL hashmark. no extra steps are required.
o
Perfect I fixed it is there a way to make it faster though... when atc is clicked i count its 4 seconds till the slide cart opens...
This is not ideal
p
This delay could be coming from the JS code or the cart drawer app itself.
o
Apparently its coming from replo
p
Hello, Oluwaseyi here from the Replo team. The delay you're experiencing when clicking the add to cart button is due to the button running a specific JavaScript interaction within the theme. This interaction is necessary for the button to function correctly but takes a bit longer to execute because buttons running additional scripts may have slight delays.
o
RIP so there is no solution to speed this up?
p
The delay occurs because this particular button runs a JavaScript interaction within the theme. While this script is essential for the button to function correctly, it does take a bit longer to execute compared to a standard button. Additionally, since this button is not a native Replo add to cart button, it isn't optimized for the fastest performance on our platform. We understand how frustrating this can be and sincerely apologize for any inconvenience it causes. While we would love to be able to optimize the JavaScript code to speed things up, this isn't possible in this case as the code is third-party and beyond our control. Please know that we are committed to improving the user experience and are here to support you in any way we can. If you have any further questions or need assistance, please don't hesitate to reach out. Thank you so much for your understanding and patience.