• Resolved BlottedInq

    (@blottedinq)


    Hello,

    [Warning: this may be a complex problem, but I’m not privy to much code so I figured I would try :-)]
    I saw this plugin and I jumped to download at the potential for a site I am building for a client.
    However, I am wondering if this can be used with the “Add To Cart” button on WooCommerce; but only on specific items. I would also need specific boxes for specific products as opposed to all products giving the same sliding notification.

    I have tried making it automatically slide in when it goes to the “already added to cart page” specifically – as I only need to sliding box to appear on products that can be added to the cart only once – with little to no success ??

    Either way, amazing plugin – but this would make it beyond amazing for me! (Know tons of people willing to pay/donate if this can be applied somehow)

    Thank you and if anyone has an idea, feel free as I am willing to try anything and I am also under a deadline! Thanks

    -Blot

    https://www.ads-software.com/plugins/scroll-triggered-boxes/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Blot,

    What exactly do you want to accomplish: A user clicks on the add to cart button and a box slides in, if the product fits some criteria?

    You could have your boxes load on the product page (with the conditional rules) and then add a few lines of JS to have them slide in after clicking the add to cart button. The jQuery code for that would look something like this (untested).

    $("#add-to-cart").click(function() {
    	var box_id = 123;
    	$("<a>").attr('href', '#stb-' + box_id).click();
    });

    You just need to find a way to find the box ID then. Or if only the correct box is on the page, simulate clicks for all boxes.

    If you can go into a little more detail about what you’re trying to do I’d be happy to see what can be done to make this easier with the plugin as it is now. ??

    Thanks!

    Thread Starter BlottedInq

    (@blottedinq)

    “What exactly do you want to accomplish: A user clicks on the add to cart button and a box slides in, if the product fits some criteria?”

    Yes, what you have written there exactly.
    Also, where would I implement those lines you have given?

    Sorry I did not see your reply earlier- I expected an email when I got a reply but no dice there :-/

    Specifically, I have a product group that requires items to be added to their cart in steps. (food delivery website)

    example: first they have to add a diet therapy package (cancer fighting / gluten free/ etc) then they have to choose the specific meals from our menu that they may want from within the package.

    What I am looking for is: when a user clicks “add to cart” on a specific item, a box then slides in from the side prompting them to click a button to continue. the “continue” button is located within the popup and this button takes them to a category page on our menu that corresponds to the item added to cart.

    -example of what I have set up so far.

    https://karmynskuisine.com/?product=breakfast-lunch-dinner-gluten-free-20

    My site is currently under construction and this would help me launch before X-mas as planned.

    Thank you for your help in this matter, I feel like I have explained it as clear as possible but it is still a little complex :-/

    -Blot

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using with WooCommerce’ is closed to new replies.