Tagged: ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1206749

    Hi support,
    I’m using ajax search for woocommerce on our website which gives the user different search results. One of them, the product result, shows the product in a preview layer next to the results list. Below the product image users can choose a quantity and put the product into their cart right out of this dialog.

    I assume there is a JavaScript function that converts standard quantity input to quantity in Enfold style with “plus” and “minus”, is that correct? How can we add those plus/minus buttons on the quantity field when we call woocommerce_quantity_input() in AJAX because Enfold doesn’t add it automatically?

    Here’s the website, the search field ist directy below the top slider. Please try POLAR as search term and hover the results below the “PRODUKTE”. The single product view with quantity input opens on the right side:

    Thank you very much in advance!

    • This topic was modified 4 years, 3 months ago by lopinus.
    #1208820

    Hey,

    Sorry for the late reply!

    Please try using avia_apply_quant_btn(); function which is located in enfold/config-woocommerce/woocommerce-mod.js

    Best regards,
    Yigitx

    #1210767

    Hi Yigit,

    thank you very much for your help, this worked!
    This script is not included in our production website yet, but there is another issue that appears independently from this:

    When you click on “add to cart” in single product view of the search results, a message appears right below the mini cart in the right top corner, like “product xy was added to your cart”. This product string is currently empty (” “) – is there a way to fix it?

    Please type in search field “POLAR” as an example, then choose a single product and add it to cart.

    #1210802

    Hi,

    Could you please post a screenshot of the issue? I followed your instructions and it correctly displays “product xyz was added to your cart” message above single product page however there should not be such notification under mini cart by default.

    Best regards,
    Yigit

    #1210804

    Hi,
    sorry for my bad English!

    The issue appears on home page when you use the search plugin right below the slider.
    Typing i. e. “POLAR” into the search field will display the results in different categories. One of them is “PRODUKTE”. If you hover the results, single products will be displayed on the right side of search results layer. If you click “add to cart” no product name ist shown.

    Here’s a screenshot (hope it works)

    #1210815

    Hi,

    Thanks for the screenshot, I can now see the issue. But when I add a product from homepage, product name shows up fine. Could you please try using “update_cart_dropdown” function located in the same enfold/config-woocommerce/woocommerce-mod.js file as well?

    Best regards,
    Yigit

    #1211056

    Hi,
    that doesn’t solve this issue. After adding a product to the cart form the search panel, the cart dropdown is updated. There is no need to call update_cart_dropdown(); again. Only the title and image are empty on the quick notice under the cart dropdown.

    Maybe you have any other suggestions?

    Frank

    #1211073

    Hi,

    Following line in woocommerce-mod.js file displays the product name

    template 	 = jQuery("<div class='added_to_cart_notification'><span class='avia-arrow'></span><div class='added-product-text'><strong>\"" + product.name +"\"</strong> "+ msg_success+ "</div> " + product.image +"</div>").css( 'opacity', 0 );

    But it does not get product name when adding to cart from search panel.

    JS is not my strongest suit so I will ask my teammates to check.

    Best regards,
    Yigit

    #1214274

    Hi Yigit,

    thank you for this info – did you find the time to ask your team mates yet?

    Frank

    #1214657

    Hi Frank,

    Yes, I have asked them the same day however our forums are a bit busy lately so apparently no one could come up with an easy solution.
    If this is important for you, please consider to hire a freelance developer. The line I pointed out in my previous reply should help :)

    Best regards,
    Yigit

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.