Menu Close
    Hire us Request quote Reading list Switch to dark mode

    Get an action when you change product combination on product page

    Get an action when you change product combination on product page – Front End. As prestashop has changed this time itself drastically whether we talk about the design point of view or code point of view. They have introduced symfony in its new released as we all know.

    This blog will let you get the action like retrieving the id_product_attribute or other information related to the product on product detail page when some change change the attribute or combination of the product. As prestashop has minified JS file into a common file core.js, in which almost all code of js has been written and compressed… So its difficult to override any event of core.js

    By this post, you will get a way to retrieve event like getting product attribute id or other information related to product while changing the combination of product on product page.

    Lets understand the code written in above block :-

    On DOM load we have used click event of jquery, when combination change event perform by customer, then we can get this event in

    . . .
    Subscribe Articles

    Just enter your email below to subscribe and receive weekly updates about the most interesting similar articles.

    You need to accept conditions to receive letters.
    You've Subscribed!

    Share article via

    . . .

    Now, we have created one URL

    var actionURL, will be pass in post request for making querying from the server.

    in the above code, we have used post method of jquery which help us to make a return of product information containing all the related information like product quantity, product attribute and its ID and so on. All the information can be retrieved by the resp variable. Like if you need to have product id attribute then you can use var idProductAttribute = resp.id_product_attribute ………..

    Hope, it will make some points clear to you…..
    For any doubt, you can ask by commenting on this blog below 🙂 🙂

    . . .


    Add Your Comment

    Be the first to comment.

    Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again