Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Ajaxify, toggleCart on hover? / location of responses/errors #265

Closed
ingueferroque opened this issue Nov 3, 2014 · 3 comments
Closed

Ajaxify, toggleCart on hover? / location of responses/errors #265

ingueferroque opened this issue Nov 3, 2014 · 3 comments

Comments

@ingueferroque
Copy link

I have two questions regarding the excellent Ajaxify:

  • Is there a way to have a have the dropdown cart appear when I hover over my cart button?
    Simply trying this does not yield any results: toggleCartButton: '#cartToggle, li.cart a:hover'
  • My responses/errors (out of stock message after I add a product to cart from the product page) are appearing below my form. However on the Timber Theme these responses appear in a specific/logical location below the product description. I am trying to replicate this behavior but can't find out where this is set.

Thank you for any help!

@ingueferroque
Copy link
Author

Perhaps I am asking the wrong question, basically, I'm trying to figure out what is telling Timber's Ajax Cart plugin to print the feedback near the Add to Cart button. Because for me it puts the feedback text at the bottom of my form. I've tried everything but can't locate what is causing it.

@cshold
Copy link
Contributor

cshold commented Nov 5, 2014

The cart toggle is setup on click, so changing that to hover will be in ajaxify.js or ajaxify.js.liquid depending on your Timber version. You'll want to look for this line in your file and change it to what works for you. hover or mouseover would probably be the best. Remember though, this click toggles the cart open and closed so you may need to do some custom work to make sure it doesn't trigger too often.

Can you provide a screenshot and/or link to your theme so I can test out the second part of your question?

@cshold
Copy link
Contributor

cshold commented Nov 6, 2014

Looks like the issue was the form markup. The error message is appended after the form element on the product page, so it's best to only wrap the variant options, quantity selector, and submit buttons with the form.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants