Commit Graph

99 Commits

Author SHA1 Message Date
Mike Jolley f0bae3e5d7 Dupe comment 2016-08-12 10:39:21 +01:00
Gabor Javorszky 72982ab1e8 Fix jshint errors and minifies the script 2016-08-11 01:22:06 +01:00
Gabor Javorszky ddd34a4460 Fix add to cart variation AJAX mode when cart fragments are dequeued
No issue.

* high traffic site, so wc-cart-fragments are dequeued (#7777)
* variable product with a lot of variations, so stock lookup happens through ajax
* previously the add-to-cart-variation.js used the wc_cart_fragments_params for the ajax URL, which in this case wasn't available, the result was a hung page
* decoupled from cart fragments: added the wc_ajax_url to the params that wc_add_to_cart_variation_params gets, so no more hung pages.
2016-08-11 01:17:43 +01:00
Mike Jolley 06f7222a57 [2.6] Ensure value is not null in variations to support empty show_option_none setting
Fixes #11508
2016-07-22 12:42:21 +01:00
Mike Jolley 317bbc1b8d Merge pull request #11378 from franticpsyx/variations-script-ajax-post-custom-data
[2.6] Post custom data when fetching a variation via ajax
2016-07-19 13:41:27 +02:00
Manos Psychogyiopoulos 982e2011a6 post custom data when fetching a variation via ajax
Sometimes it is needed to add "context" to a variations ajax request, in order modify the returned object content. For instance, in cases where the variation is part of a bundled variable product, we may need to modify the price, stock status or the description of the variation according to the "context".
2016-07-07 11:16:46 +03:00
Manos Psychogyiopoulos 90b4d6090e use existing $form var to block/unblock
Existing code could cause other `variations_form` elements on the same page to block/unblock as well.
2016-07-07 11:07:20 +03:00
Mike Jolley 0cb2f2760c block ui when switching variation with ajax 2016-06-06 14:37:52 +01:00
Mike Jolley 843e540ed5 Add classes to variation button wrapper 2016-05-19 11:17:34 +01:00
Zach Stepek c96cd1e4d3 Merge branch 'master' into variation-sku-fix
# Conflicts:
#	assets/js/frontend/add-to-cart-variation.min.js
2016-05-11 14:41:39 -05:00
Zach Stepek 50a7b07496 Update specificity of jQuery selector used to reset SKU in product-meta 2016-05-11 12:25:56 -05:00
Justin Shreve 328ad226e8 [2.5] Correct the 'unavailable template' call for variations so the message is displayed correctly, fixing a JS error. 2016-02-17 07:50:38 -08:00
Kristofer Norén f1bf89db2b Corrected content in alt-tag
Previously both the alt-tag and the title-tag of the variations main image used content from variation.image_title. The alt-tag should use variation.image_alt.
2016-02-11 13:40:56 +01:00
Mike Jolley 4c29b7607f Show notices on variation button clicks
Closes #10281
2016-02-08 16:21:02 +00:00
Mike Jolley 254c8cf677 Prevent default in variation script
Closes #10223
2016-02-01 12:16:17 +00:00
Mike Jolley 5db85c6ef7 [2.5] Compatibility with w3 total cache inline minification 2016-01-25 20:14:45 +00:00
Mike Jolley 1b5af9e188 Output the wp.template instead of passing in 2015-12-04 14:28:32 +00:00
Mike Jolley 3ae614c5a8 Wrap is Always visible since 2.5.0 2015-12-04 13:45:47 +00:00
Mike Jolley b7d8091a44 pass full variation object into script instead of parts 2015-12-04 13:31:36 +00:00
Mike Jolley 2c023a2847 Pass the wp.template to the script and append so its added to the page once when needed 2015-12-04 13:26:44 +00:00
Tiago Noronha 105105db06 Adds support for srcset and sizes attributes in variation images. 2015-11-23 16:35:11 +00:00
Claudio Sanches 034871a395 Fixed js coding standards 2015-10-28 16:52:31 -02:00
Mike Jolley dddca9b7a6 Avoid animation when no text is present 2015-10-28 15:43:06 +00:00
Mike Jolley edd2e4f2cb wp.template is not required for cart button 2015-10-28 14:59:40 +00:00
Mike Jolley f7a065fb53 Button initial state 2015-10-28 14:27:02 +00:00
Mike Jolley 6f5aaa69da Fix single variable 2015-10-28 13:53:51 +00:00
Mike Jolley a28da6eabc Remove wc_variations_description_update effects 2015-10-28 13:04:45 +00:00
Mike Jolley f050c804e1 Use wp.template for variation and variation button 2015-10-28 13:04:28 +00:00
Claudio Sanches 9b47f3866a Prevented reset to default option when click in any attribute option
Improvement for #9335
2015-10-27 17:59:26 -02:00
Claudio Sanches 2f0f8f5b3e Fixed focus on attributes select fields for variable products
This is an issue on IE 11, since we test for "focusin touchstart", IE 11
can't loses the focus and need to this "snippet" to make IE work like
another browsers.

Closes #9335
2015-10-27 17:24:32 -02:00
roykho 52ec35cab6 tweak to use product class function instead of body class function 2015-10-02 10:26:53 +02:00
roykho 5ba6ff1dac fix variation image flicker issue when default variations are set closes #7904 2015-10-02 03:45:11 +02:00
Mike Jolley b9381d1495 Revert uniform fix - looking into doing it in-theme 2015-08-21 19:24:39 +01:00
Mike Jolley 10c0b92d0d Added BW compatibility for themes using 'uniform'. 2015-08-21 15:37:00 +01:00
Manos Psychogyiopoulos f5691fd82a animate variations script markup changes 2015-07-31 14:04:55 +03:00
Manos Psychogyiopoulos dae10a962c allow product variations data refresh 2015-07-28 15:34:04 +03:00
Mike Jolley d0c2c10c47 Made the linter happy 2015-07-27 17:55:37 +01:00
Mike Jolley 0ab151562a Fix issues with trailing slashes on permalinks
Closes #8658
2015-07-27 11:56:07 +01:00
Mike Jolley 44b91e5b66 Revert triggerHandlers back to trigger() for BW compat
Closes #8569
2015-07-14 10:28:49 +01:00
Mike Jolley 2834eff221 Merge branch 'variations-8477'
Conflicts:
	assets/js/frontend/add-to-cart-variation.js
	assets/js/frontend/add-to-cart-variation.min.js
	assets/js/frontend/add-to-cart.min.js
	assets/js/frontend/checkout.min.js
	assets/js/frontend/geolocation.min.js
2015-07-10 11:37:05 +01:00
Claudio Sanches 62d879e86c Fixed all jshint errors #4680 2015-07-10 02:13:30 -03:00
Mike Jolley 9531258ee6 Treat each form separately. 2015-07-09 16:21:17 +01:00
Mike Jolley 65f19d5ca7 Ajax variation handling
If there are more variations than the threshold allows (set to 20
currently) this loads the matching variation via ajax instead of inline
in the HTML. #8477
2015-07-09 15:56:20 +01:00
roykho 54b0a0ca54 changed dynamic variation description to allow limited HTML and some sanitized tweaks 2015-05-28 14:31:45 -07:00
roykho b812b2fd94 add dynamic variation description feature 2015-05-14 10:56:26 -07:00
James Koster aebef4aece variation img title / caption. closes #8032 2015-04-28 17:19:38 +01:00
Mike Jolley d7144d9ed6 [2.3] Reset sku when no option chosen
Closes #7799
2015-03-23 13:03:53 +00:00
Manos Psychogyiopoulos 60ebac7cdf allow zero min/max quantity input values 2015-03-10 02:42:00 +02:00
Risto Niinemets d9e63dcbb2 "hide_variation" hook 2015-02-04 18:08:14 +02:00
boohoogal 538d514cc0 As suggested kept original event and created new event 'woocommerce_variation_has_changed' for after selection has been fully applied. #6833 2014-12-11 10:02:24 +00:00