Gaetan Craig-Riou
80112709f3
Fix invoice and api serializer
2024-07-03 10:17:49 +10:00
Matt-Yorkley
fbd09869bb
Remove is_master from variant serializer
2023-06-16 21:23:44 +01:00
Matt-Yorkley
7dc1091bc2
Migrate product image from master variant to product
2023-06-16 21:23:44 +01:00
Matt-Yorkley
5ad37ce6a5
Return default image url on ActiveStorage errors in image loading
2023-06-14 12:53:20 +01:00
Jean-Baptiste Bellet
3c05fc3c80
Add fees name for a variant to its serializer
2022-06-21 14:42:22 +02:00
Maikel Linke
b7efa1b018
Replace Paperclip on Spree::Image
2022-06-01 17:16:55 +10:00
Matt-Yorkley
1d5077061e
Remove andand
...
This old gem implemented some functionality for handling nils which is no longer needed, as it's provided natively by Ruby with the &. operator.
2021-09-08 14:28:31 +01:00
Luis Ramos
e52937c113
Use rubocop auto correct to add frozen string literal to all files
...
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00
Luis Ramos
23627c5453
Run rubocop -a (safe corrections) removing all exceptions so all possible fixes are applied
...
9290 issues fixed
2021-06-17 22:19:26 +01:00
Matt-Yorkley
741dee29c3
Defend against nils in variant serializer
...
If unit_price.denominator ever returns nil, the serializer won't explode now.
2021-03-30 14:45:33 +01:00
Andy Brett
7319ef7345
use better method and class names
2021-03-25 08:51:15 -07:00
Andy Brett
89c7342892
memoize UnitPrices object
2021-03-25 08:51:15 -07:00
Andy Brett
39fc0707c3
provide unit price values in front end shop
2021-03-25 08:51:15 -07:00
Jean-Baptiste Bellet
8c42388af1
add a randomized unit price for variant
...
unit price is composed with :
- a unit_price_price which is a number that can be localized (depending on the currency)
- a unit_price_unit which can be either `item` of `kg`
@andrewpbrett will do stuff to have a relevant unit price for each variant
2021-02-16 15:26:21 +01:00
Matt-Yorkley
b441ac2644
Update paths to "noimage" images
2020-06-29 20:07:08 +02:00
Matt-Yorkley
234f0f94cf
Change images in serializer to use product.images over variant.images
2020-06-18 22:21:55 +02:00
Matt-Yorkley
a8b981e9cd
Add product thumbnais to serializer for cart dropdown images
2020-06-18 22:21:54 +02:00
luisramos0
9404aacfb2
run rubocop --auto-correct
2019-11-10 18:42:43 +00:00
luisramos0
a44a251d96
Remove duplicated attributes tag from all serializers to create consistency
2019-09-19 16:32:09 +01:00
luisramos0
c3fbf9cdf9
Remove unused pagination from index and respective specs, fix spec for search by sku by adding sku to the serializer and adapt a few specs to pass with AMS attrivbutes,
2019-07-31 09:40:19 +01:00
luisramos0
180598c603
Convert spree/api/variants_controller to AMS by changing base_controller, using render json instad of respond with, deleting rabl templates and adapting specs
...
Delete unused pagination spec
2019-07-31 09:40:19 +01:00
luisramos0
86b0d71c7e
Result of rubocop auto-correct and rebuilding rubocop_manual_todo
2019-05-28 12:57:29 +01:00
luisramos0
f0842fcbe5
Convert all calls to variant.count_on_hand to variant.on_hand
2019-02-18 21:54:07 +00:00
Rob Harrington
6c38997010
Fix 1664: product tag rules not working
...
Caused by a combination of: fe7bd5e2cd and 38d3b446cc
Have added/tweaked specs to prevent this from happening again
2017-11-15 10:26:24 +11:00
Duende13
b2bae242d9
Sorting variants by name_to_display and unit_value. Issue 1604.
2017-07-21 10:18:55 +10:00
Rob Harrington
38d3b446cc
Removing unused #tag_list method on VariantSerializer
2017-05-12 16:11:16 +10:00
Maikel Linke
fe7bd5e2cd
Serialise tag_list only for variant overrides
...
Don't try to call tag_list on just variants since that will fail.
Normally, all variants of `current_order` should be extended to
VariantOverrides of the current order cycle. But in development
environment, it can happen that the variants are reloaded without being
extended again.
2017-05-05 14:18:20 +10:00
Rob Harrington
302bdfd628
Implementing FilterProducts rules in the frontend
2016-05-27 16:23:26 +10:00
Rob Harrington
ab7bfd10c5
Revert "Renaming options_text to unit_text so that we can use method from included VariantAndLineItemNaming module"
...
This reverts commit e86e08b72e939fee61eddd41d56081395666a877.
Conflicts:
lib/open_food_network/order_and_distributor_report.rb
spec/features/admin/variants_spec.rb
spec/lib/open_food_network/order_and_distributor_report_spec.rb
2015-10-28 13:08:50 +11:00
Rob Harrington
795830d94d
Renaming options_text to unit_text so that we can use method from included VariantAndLineItemNaming module
2015-10-28 13:07:31 +11:00
Rohan Mitchell
fc7e33d706
Fall back on individual calculations when pre-prepared values are not present
2015-06-04 16:43:19 +10:00
Rohan Mitchell
ef3155a16a
Pull product listing fee calculations out of serializer loop
2015-06-04 16:27:32 +10:00
Rohan Mitchell
efbf2c7ffa
Display extended variant name in quick cart
2015-03-13 12:58:53 +11:00
Rafael Schouten
ac3c3f9f6c
remove to_f on decimals
2014-09-17 13:19:34 +10:00
Rafael Schouten
991d0029dd
add currency localisation
2014-09-08 00:06:53 +10:00
Rohan Mitchell
8c41a6c909
Calculate fee breakdown
2014-07-31 11:36:53 +10:00
Rohan Mitchell
fc95e088df
Show collapsed price breakdown
2014-07-30 14:59:16 +10:00
Rohan Mitchell
77b279ca97
Stub base_price and fees on variant serializer. Calculate basePricePercentage on variant.
2014-07-30 14:34:05 +10:00
Will Marshall
f1c4ca98a1
Defaulting to OFN logo
2014-07-29 12:55:58 +10:00
Will Marshall
39f9e991ad
Minor regressions and bug fixes
2014-07-28 11:30:35 +10:00
Will Marshall
a2da7f7ede
Merge branch 'caching' into new_cart
...
Conflicts:
app/serializers/api/variant_serializer.rb
2014-07-18 11:23:25 +10:00
Will Marshall
562f8dbd4e
Starting to restructure data injection
2014-07-18 11:21:51 +10:00
Will Marshall
26e8a1fd91
Uncaching some parts and adding specs
2014-07-10 14:49:21 +10:00
Will Marshall
f57e8513d5
Spiking out products serializers and caching
2014-07-10 12:46:25 +10:00