Commit Graph

171 Commits

Author SHA1 Message Date
Mike Jolley af32b3ea91 Product crud admin save routine (#12174)
* Initial props

* Work on admin saving

* Set/get attributes

* Atom was moaning about this before but no longer.

* Update get_shipping_class

* WC_Product_Attribute

* Use getter in admin panel

* Fix attribute saving

* Spacing

* Fix comment

* wc_implode_text_attributes helper function
2016-11-09 15:43:20 +00:00
Justin Shreve 5b09c9f063 [Product CRUD] Variable (#12146)
* [Product CRUD] Variable Products

* Handle PR feedback.
2016-11-09 15:41:25 +00:00
Mike Jolley a85ad09e7e Rename method 2016-11-09 15:40:51 +00:00
Mike Jolley 731df74bad Availability html 2016-11-09 15:40:38 +00:00
Mike Jolley 4c0cc54f79 Hardcode the get_type per product class 2016-11-09 15:37:51 +00:00
Mike Jolley 5f886c326a [2.6] Populate attribute dropdown when empty
Fixes #11983
2016-10-14 12:09:24 +01:00
Claudio Sanches e67bbba878 Fixed undefined variables 2016-10-13 20:29:50 -03:00
James Koster 3823b78318 Add/product galleries (#11665)
* register prettyPhoto but don't enqueue. #10721

* Remove lightbox option. #10721

Also registers the prettyPhoto styles instead of enqueueing

* Stip all prettyPhoto related stuff from the templates and tidy up some logic. #10721

* Add flexslider assets #10721

* styling and re-adds `woocommerce_single_product_image_thumbnail_html`. #10721.

* Add zoom functionality. #10721

* Move js to single-product.js. #10721

* styling of the gallery thumbnails when using the `product_page` shortcode. #10721

* Only enable the zoom if the image is large enough. #10721

* Use a 4 column layout by default. #10721

* Make the carousel options filterable. #10721

* rtl styles for gallery. #10721

* Don't zoom on handheld devices. #10721

* markup tweaks in prep for photoswipe

* disable zoom for now

* Add and enqueue photoswipe assets

* add the photoswipe template

* initialise photoswipe - it's alive!

* tidy up js. add title. add separate trigger. #10721

* Move photoswipe functions to single-product.js. #10721

* reactivate the zoom! #10721

* style the photoswipe trigger. #10721

* disable flexslider animation loop. #10721

* js tidy up. #10721

* Fix jshint

* Abstract the product gallery scripts

* Minify

* Fixed conflict with the admin bar

* Photoswipe conflict with admin bar

* Index. #10721

* photoswipe button styles. #10721

* Styling. #10721

* No animation on zoom
* Image width on mobile

* No shadows please. #10721

Looking at you, Twenty Twelve.

* code tidy and add class to placeholder figure. #10721

* simplify rtl query

* photoswipe button styles

* Comma should not be here

* zoom icon #10721

* gallery thumb styles. #10721

* trigger icon. #10721

* Image margins. #10721

* icon hover states. #10721

* Variation handling

* Fix zoom and heights

* Resize after timeout
2016-10-13 15:25:42 +01:00
Aristeides Stathopoulos 734f284fa4 WordPress.PHP.YodaConditions.NotYoda 2016-09-08 01:32:24 +03:00
Aristeides Stathopoulos d4e3faf014 PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket 2016-09-02 04:51:31 +03:00
Mike Jolley 402d0ff077 Merge branch 'master' into pr/11797
# Conflicts:
#	includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php
#	includes/api/class-wc-rest-coupons-controller.php
#	includes/class-wc-coupon.php
#	tests/unit-tests/api/coupons.php
#	tests/unit-tests/coupon/crud.php
2016-09-01 11:43:31 +01:00
Mike Jolley 0a3506777b Inline comments to make this clearer 2016-08-31 17:52:03 +01:00
Gabor Javorszky 219480b329 Save the version on the property too 2016-08-31 16:21:17 +01:00
Gabor Javorszky 9cfa231167 Fixes reset cache and version assignment for variable product prices
Fixes #11812

$this->array was only used to return to the user. Comparison was done with $prices_array, which did not contain the version information because it was never saved in the transient.
2016-08-31 11:12:49 +01:00
Aristeides Stathopoulos fb62d280b5 WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore 2016-08-27 09:07:42 +03:00
Aristeides Stathopoulos 72ee94d11b WordPress.Arrays.ArrayDeclaration.SpaceBeforeComma 2016-08-27 05:46:40 +03:00
Aristeides Stathopoulos b063bcfe4c last item in a multiline-array should end in a comma 2016-08-27 04:46:45 +03:00
Mike Jolley b0064bddf6 Remove boolval 2016-08-04 11:12:14 +01:00
Mike Jolley 5a9dacd595 Show variable weights/dimensions even when parent values are not set. 2016-08-03 16:07:34 +01:00
Mike Jolley 579175257f Add transient version to price hash
Closes #11520 @claudiosmweb
2016-07-25 13:33:35 +01:00
Claudio Sanches 08f95481e0 Normalize the "Read more" button text, closes #11319 2016-06-30 15:16:26 -03:00
Mike Jolley 594641422d Show read more if variable product is out of stock 2016-06-07 14:34:27 +01:00
Mike Jolley 3fd15ad50f Unused vars and code docs 2016-06-06 18:57:24 +01:00
Manos Psychogyiopoulos 35ff166a85 woocommerce_variation_prices filter runs only for the first hashed prices array loaded from the transient 2016-05-25 00:54:07 +03:00
Mike Jolley e552c3c916 Remove filter to hide variations with no prices in get_children()
#10854
2016-05-10 18:23:16 +01:00
Mike Jolley edbb03a5d8 Only exclude variations with no price if filter is set
Closes #10854
2016-05-05 16:05:40 +01:00
Mike Jolley be9b7bd4b5 If no variation ID is set, do a match
Closes #10737
2016-04-20 12:35:06 +01:00
Mike Jolley 3a5feddbf5 [2.5] Set captions 2016-03-30 11:15:34 +01:00
Mike Jolley 00a6fe8682 [2.5] Allow big selects when getting variations 2016-03-08 11:33:04 +00:00
Mike Jolley c469ab920b Use wpdb query instead of looping over children
Closes #10195

cc @claudiosmweb

Since this uses `$this->get_children( true );` it will also hide out of
stock variation attributes if that setting is enabled.
2016-02-15 15:53:43 +00:00
Mike Jolley 3dba3378c2 Merge pull request #10315 from woothemes/layered-nav-wp-query
Layered Nav Improvements
2016-02-12 11:59:40 +00:00
Mike Jolley fd38adcc36 Format variations to same type
Fixes #10310
2016-02-11 15:22:51 +00:00
Mike Jolley 5b0abaaa1b Sync min and max price for better filtering! 2016-02-09 20:16:08 +00:00
Mike Jolley a78edb2af2 [2.5] If an attribute meta key is not set, technically its 'any', so should match. Prevents issues when meta data is missing after renaming attributes
@claudiosmweb please test :)

#10272
2016-02-04 18:25:06 +00:00
Mike Jolley 35e45e6075 Make price function clearer
@tamarazuk @franticpsyx @daigo75 Hopefully this makes it clearer which
values are returned and when the filter is ran.
2016-01-13 15:07:47 +00:00
Fredrik Forsmo f1920cb882 Improve docblock comments in various WC_Product classes
* Added comments to methods that was `method function`
2016-01-06 16:15:00 +01:00
Mike Jolley 8b9bdbb228 Product version storage to invalidate cache when needed
#9922 for @daigo75
2015-12-31 16:31:20 +00:00
Mike Jolley 7c7e21be50 Only use the 'function' portion when generating price hashes
Keeps hashes the same after page load when a plugin uses a class method
callback or anonymous function Closes #9922 @claudiosmweb
2015-12-31 16:21:12 +00:00
Mike Jolley 429fee1703 JSON instead of serialise should reduce storage size
#9922
2015-12-31 13:15:01 +00:00
Mike Jolley 0b678ab2af Tweak save logic to set _price for variables/groups via sync functions only
Closes #9892
2015-12-23 13:08:45 +00:00
Mike Jolley 496eb3385e srcset sometimes is false. 2015-12-09 10:29:41 +00:00
Mike Jolley 61c3e74d4f srcset should not be set to 'false' 2015-12-07 11:57:02 +00:00
Mike Jolley 12db1d4637 Notify users of no variations but leave status as is.
Closes #9713
2015-12-03 10:14:00 +00:00
Mike Jolley 75529edbe5 Merge branch 'pr/9628' 2015-11-27 13:00:39 +00:00
Mike Jolley 03d9239f40 Correct variable name 2015-11-27 13:00:08 +00:00
Mike Jolley 615c262f6f Function exists for wp_get_attachment_image_srcset and sizes
Sizes #9714
2015-11-27 11:30:47 +00:00
Tiago Noronha 3fdec7f4a8 Init added variables if product doesnt have featured image. 2015-11-24 23:00:25 +00:00
Tiago Noronha 105105db06 Adds support for srcset and sizes attributes in variation images. 2015-11-23 16:35:11 +00:00
Dominic 5ef59c511b Optimize filter loop
The current method loops through every defined hook in the WordPress
environment (over 400 on one of my tests). This method only checks the 3
filters in question.
2015-11-17 00:27:44 -08:00
Mike Jolley b59ec6de76 Move var definition to abstract 2015-11-14 16:39:53 +00:00