Jump to content

Call $cart->getSummaryDetails() after saving cart


Szed

Recommended Posts

Hi !

 

I would like to be able to, in a module, call $cart->getSummaryDetails() (with ajax) and do some other javascript after my cart was saving or updating.

 

I use hookActionCartSave but i can't use a .tpl with it, so no javascript.

 

Anybody have an idea ?

 

Thanks !

Edited by Szed (see edit history)
Link to comment
Share on other sites

I'm tried  

public function hookActionCartSave($params){
    echo '<script type="text/javascript">console.log(\'test\')</script>';
}

But when the hook is call, i got an alert Error (for example when i add a product to my card : impossibe to add to cart / text status : parse error / responseText : unexpectable token <' / [...]

 

:/

Link to comment
Share on other sites

Yeah, i tried that finally.

But there is a lot of button/action who update the cart (add to cart, update quantity, change carrier, delete product, bloc cart...).

 

So, a hook which is call after each action on the cart, with a template, will be a better solution, but i did'nt find one :(

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...