Skip to main content

I need Ajax response code on checkout

More
8 years 7 months ago #288403 by naveedm
-- url of the page with the problem -- : test.drtuba.eu/shop/cart/checkout
-- HikaShop version -- : 3.3.0
-- Joomla version -- : 3.8.3
-- PHP version -- : 5.6.26
-- Browser(s) name and version -- : mozila firfox
-- Error-message(debug-mod must be tuned on) -- : I need to modify ajax response of checkout.

Hello Team,

I want to update some fields at the time of ajax response but I unable to find ajax code where it is updating html elements.

So Please let me know where I can get it and how I can change values so my custo html elemnt can get values. (LIKE TOTAL PRICE after change shipping method.

Please have a look this website url.
test.drtuba.eu/shop/

Thanks

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

More
8 years 7 months ago #288404 by nicolas
Hi,

You can use such javascript code:
Code:
window.Oby.registerAjax(['checkout.shipping.updated'], function(params){ // your code for when shipping method selection is updated });
If you check the different show_block_ view files of the view "checkout", you'll find similar pieces of code which register javascript code to do stuff when something changes (mainly refresh some of the blocks when some other blocks are changed).

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

More
8 years 7 months ago #288528 by naveedm
Hi,
I know about it, But I need place where I can replace value after ajax responded.
But here values getting before ajax responded. So please let me know file where ajax making or code that is called last.

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

More
8 years 7 months ago #288531 by nicolas
Hi,

No, this code is triggered after the AJAX call, not before.... but maybe we're not talking about the same thing ?
What javascript code do you need to run exactly ? For what purpose ?

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

More
8 years 7 months ago #288561 by naveedm
But when I am adding some code after ajax it is calling before ajax response.

I want to update bottom price that is showing top of Place order Button,
I have added it. SO I want to do when any event change like qunatiry update, shipping method or any other what changes total price I want to update bottom price as well.
Please have a look screenshot :http://prntscr.com/ij1ic8

My website URL : test.drtuba.eu/shop/

Thanks in advance.

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

More
8 years 7 months ago #288567 by nicolas
Hi,

So from what I understand, you want to add your javascript at the end of the "show_block_cart" view file via the menu Display>Views. That way, your javascript will be executed each time the cart view is refreshed. And it will refresh each time the full total changes.

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

More
8 years 7 months ago #288573 by naveedm
Hello ,
Please reply me I need your help.

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

More
8 years 7 months ago #288588 by Jerome
Hello,

I'm sorry but Nicolas did reply ; so I don't know what you're asking...

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.

More
8 years 2 months ago #296001 by kyratn
Hi,

How could i add some javascript after checkout guest user information submit?

Basically i need to execute some js after this button submit:
Code:
<button type="submit" onclick="window.checkout.submitLogin(2,1, 'register'); return false;" class=" btn btn-primary btn-xs-wide hikabtn_checkout_login_register" id="hikashop_register_form_button">Next</button>

Couldn't find any register ajax for this.

Thanks

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

More
8 years 2 months ago #296002 by kyratn
Please ignore found it :)

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

Time to create page: 0.249 seconds
Powered by Kunena Forum