Question regarding add to cart and checkout finish

  • Posts: 1119
  • Thank you received: 114
5 years 2 months ago #302184

Hi,

1. When add product to cart is in process i see that class "add_in_progress" is added to button on product page... But does hikashop have some kinda trigger or something, after product is added to cart? Would like to add some class after product is added to cart. So insteed just using notify plugin we could just do something like this with button text:

Add to cart->Adding...->Product added

I am fine with changing text based on class or js solution modifing button innerHtml....

2. Similar question for checkout finish button. Would like to add some class just before redirected to thank you page. The idea is this:

Checkout finish button text:

a. Before click = "Finish",
b. After click ="Please wait",
c. Just before page redirect, change text to "Complete" and then redirect....


So does hikashop have some kinda triggers for these?

Regards

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
5 years 2 months ago #302194

Hello,

1 - The classname is added and removed by the function within hikashop.js file.
And yes, there is a javascript trigger ; trigger which are used by cart notification plugins to interact when a product is added to the cart or wishlist. These triggers are using the "registerAjax / fireAjax" system which is also define in the hikashop.js file.
But there is just a trigger when a product has been added ; not a trigger before that.

2 - That button is handle in the checkout / show_block_buttons view. If you want to customize it, it's the best way.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum