Commit Graph

26777 Commits

Author SHA1 Message Date
Manos Psychogyiopoulos 174ccfadd2 add_to_cart_url filter added in loop/add-to-cart.php
Needed by Product Bundles to get rid of the last template file override.
2012-07-06 15:21:20 +03:00
Manos Psychogyiopoulos 41a5b1f3e7 WC_Cart: Uncouple add_to_cart checks from add_to_cart function.
This is a rough proposal - basically food for thought. The supplied
code has NOT been tested.

In some cases, we may need to do the checking part on multiple products
before giving permission to actually add them all to the cart. The
reason is that if any product check fails (e.g., out of stock), then no
product should be added to the cart and a product-specific error
message should be returned, like so: "Product X: The product is out of
stock", instead of a vague "The product is out of stock". This is esp
useful for Product Bundles, which at the moment handles this by reusing
parts of existing code.

Things would be more elegant if an add_to_cart_check function existed.
I am not sure if the add_to_cart_check call should exist within
add_to_cart, or if there should be 2 separate calls, one for
add_to_cart_check and one for add_to_cart, throughout the core codebase.

The supplied woocommerce_add_to_cart_error_message filters would be
useful for manipulating the messages to include product-specific info.

Finally, the woocommerce_add_to_cart_…_halt filters would be useful in
cases where these checks should not return false. I can image some
cases, esp related to bundling.

Note - This is not required for 'Product Bundles' to work, but it's
always a good idea to make the core code a bit more flexible.
2012-07-01 18:34:19 +03:00
Mike Jolley d8a969610f get_title() Closes #1204
Like the gateways now have.
2012-06-30 00:20:07 +01:00
Mike Jolley 058c3ed9d4 revert class 2012-06-29 22:14:40 +01:00
Mike Jolley b0e59cb26d Back to page 1. Closes #1186. 2012-06-29 21:18:22 +01:00
Mike Jolley cbfed071c3 When placing an order again, clear current cart. Closes #1189. 2012-06-29 20:49:27 +01:00
Mike Jolley 58f84bb2c1 incl. Closes #1184. 2012-06-29 20:45:09 +01:00
Mike Jolley 2d8981c0fb Out of stock tweaks. #1191. 2012-06-29 20:40:18 +01:00
Mike Jolley b8daf0bfd8 oz support. Closes #1190. 2012-06-29 20:24:43 +01:00
Mike Jolley a31e629ebb Order count clear transient on delete. Closes #1187. 2012-06-29 20:06:40 +01:00
Mike Jolley d85de187f9 Variable product hooks. Closes #1201. 2012-06-29 19:52:06 +01:00
Mike Jolley 3cc8f41b90 get_icon get_title get_description for #1201 2012-06-29 19:44:33 +01:00
Mike Jolley f2f847ad5b Tweaks to #1180. And get_image confusion resolved (it shouldn't echo) 2012-06-29 18:56:42 +01:00
Mike Jolley 9daae31865 readme 2012-06-29 18:10:55 +01:00
Mike Jolley 127a981f99 Merge pull request #1180 from franticpsyx/master
Disable cart hyperlinks of hidden products & minor cart widget tweak.
2012-06-29 10:10:37 -07:00
Mike Jolley fded81c26b Merge pull request #1197 from katzwebservices/master
Allow for more informed email filtering
2012-06-29 10:06:26 -07:00
Mike Jolley 491c02b35d Tweaks to previous merge 2012-06-29 17:51:15 +01:00
Mike Jolley 9b73be6eb1 Merge pull request #1202 from CodeRepublic/master
Modify WC_Product::get_image() for return
2012-06-29 09:48:08 -07:00
Mike Jolley 124f6fc47f Merge pull request #1200 from jonzon/patch-1
Update master
2012-06-29 09:45:14 -07:00
Mike Jolley cd35f60011 Windows CRT fix 2012-06-29 17:38:00 +01:00
Mike Jolley 96a522bc82 template_redirect 2012-06-29 16:38:00 +01:00
Manos Psychogyiopoulos 123d04f0e5 More meaningful code. 2012-06-29 18:16:43 +03:00
matt 2b54280999 Modify WC_Product::get_image() for return
Function currently only echos. Commit enables function to return product
image. WCP+A replaces the product thumbnail with photo preview
thumbnail. Original function showed two thumbnails directly next to each
other.
2012-06-29 11:08:50 -04:00
jonzon db156ffa30 Update master 2012-06-29 13:39:22 +03:00
Mike Jolley de83aac565 is_front_page workaround. @coenjacobs review please 2012-06-29 10:23:21 +01:00
Manos Psychogyiopoulos 3e97cc3ef1 Disable cart hyperlinks for hidden products. 2012-06-28 18:41:18 +03:00
Manos Psychogyiopoulos ea409a4310 Pull 2012-06-28 18:34:04 +03:00
Manos Psychogyiopoulos c944f190b9 Merge branch 'master' of git://github.com/woothemes/woocommerce 2012-06-28 18:33:06 +03:00
Mike Jolley c37525383b tweak the checkout update js 2012-06-28 12:52:58 +01:00
Mike Jolley b373a82de2 moved checkout buffer function 2012-06-28 12:19:54 +01:00
Mike Jolley 35f74206f2 If address is required check for state OR postcode to see if an address has been entered yet. Some countries don't have states. 2012-06-27 15:18:10 +01:00
Mike Jolley 57fe4db23c Scheduled on sale ignored from sale widget 2012-06-27 12:00:24 +01:00
Zack Katz 98f84310cf Add object data to filters
Pass valuable object data to filters.
2012-06-26 19:09:39 -06:00
Manos Psychogyiopoulos 8514661ade Merge branch 'master' of git://github.com/woothemes/woocommerce 2012-06-26 16:18:27 +03:00
Mike Jolley 57bf97230d Fix get shipping class id 2012-06-26 13:17:08 +01:00
Mike Jolley f951fbc70e widget conflict 2012-06-25 22:53:15 +01:00
Mike Jolley 955bda040d PLN fix 2012-06-25 15:31:58 +01:00
Manos Psychogyiopoulos e98005a27c Hide items from cart widget.
Useful for hiding dummy cart items.

"Product Bundles" uses this to only show bundled products when pricing
is per-item (emphasis on contents), or to hide them when pricing is
fixed for the whole bundle (emphasis on bundle).
2012-06-23 17:19:15 +03:00
Mike Jolley 4f6690c656 readme tweaks 2012-06-21 14:30:04 +01:00
Mike Jolley 5cb6354945 tax fix 2012-06-21 13:06:48 +01:00
Mike Jolley dc2be540b3 this doesn't work. use is_shop instead 2012-06-21 00:10:12 +01:00
Mike Jolley 552484e248 When SHOP_IS_ON_FRONT set is_front_page to true 2012-06-20 20:02:26 +01:00
Mike Jolley 023ee52246 Zero tax check in totals.php 2012-06-20 19:53:35 +01:00
Coen Jacobs a3cf7743bf Make United States label in JS translatable. Closes #1168 2012-06-20 19:50:54 +02:00
Coen Jacobs dd7fde369d Make hash before order number translatable. Closes #1161 2012-06-20 19:25:18 +02:00
Mike Jolley cb1f1f9a28 Allow html in notes and use textarea. Closes #1171. 2012-06-20 18:19:35 +01:00
Coen Jacobs 863918f7f4 Revert "Moved # character in translatable order strings. Closes #1161"
This reverts commit f6c83fe6aa.
2012-06-20 19:18:16 +02:00
Coen Jacobs f6c83fe6aa Moved # character in translatable order strings. Closes #1161 2012-06-20 19:14:33 +02:00
Mike Jolley d83f5f7c61 woocommerce_get_tax_rates Closes #1163. 2012-06-20 15:24:56 +01:00
Mike Jolley 89ec2c83ef Merge pull request #1165 from GeertDD/order_data_hooks
Added two hooks in the admin order data panel
2012-06-20 07:18:10 -07:00