Luis Ramos
9bbef16804
Converting all calls to ActiveRelation#sum to use a symbol with &
...
This is only applicable to database columns, if we are summing using a method in the model than the & is required!
2020-11-27 13:59:46 +00:00
Luis Ramos
7472b7cc27
Fix sum call in quantifier
2020-11-27 13:59:46 +00:00
Luis Ramos
202aa3e5b7
Use reflections instead of, now gone, reflections
2020-11-27 13:59:46 +00:00
Luis Ramos
a05f43000a
ActionView was extracted from ActionPack in rails 4.1 so we need to use ActionView
2020-11-27 13:59:46 +00:00
Luis Ramos
d7a1d7769c
Merge pull request #6258 from luisramos0/s3_with_region
...
Upgrade aws-sdk and switch to S3 virtual host style URLs
2020-11-19 22:59:57 +00:00
Luis Ramos
88ac5dc955
Fix rubocop issues by refactoring code
2020-11-10 00:03:34 +00:00
Luis Ramos
e879aa1bed
Switch to s3_alias_url that enabble virtual host type of path
2020-11-10 00:03:33 +00:00
Luis Ramos
94a815a9ef
Upgrade aws-sdk and set s3 host name using the provided url config.
...
This will enable us to set hostnames with the s3 region defined and that
will make our image upload work for all s3 regions.
2020-11-10 00:03:33 +00:00
Cillian O'Ruanaidh
89d63dfbb9
When resetting stock to 0 on absent products in inventory import also reset the on demand setting
...
Before when you imported inventory and clicked the 'Set stock to zero for all existing products not present in the file' option it would set the on hand stock to 0 but if the variant override was also set to be on demand the inventory would still be available for sale. This change makes sure the on demand setting is turned off too.
Fixes #6289 .
2020-11-06 14:57:31 +00:00
Luis Ramos
f6d0905517
Add s3_support require to image.rb
2020-11-04 12:15:45 +00:00
Luis Ramos
a07029f660
Add require so that model is available when needed
2020-11-04 12:15:45 +00:00
Luis Ramos
ab53db0c61
Merge ability and ability decorator
2020-11-04 12:15:45 +00:00
Luis Ramos
9bbeec5031
Require code from spree/core explicitly
2020-11-04 12:15:45 +00:00
Luis Ramos
af3057f55f
Remove spree requires that are not needed in OFN
2020-11-04 12:15:45 +00:00
Luis Ramos
f6195f1159
Remove duplicate_extra logic from ProductDuplicator
2020-11-04 12:15:23 +00:00
Luis Ramos
503c17f896
Move Spree::ProductDuplicator to Spree::Core namespace
2020-11-04 12:15:23 +00:00
Luis Ramos
795b7101ab
Remove spree requires that are not needed in OFN
2020-11-04 12:15:23 +00:00
Luis Ramos
9d4a15b0e0
Add required product scopes from spree_core product_scopes
2020-11-04 12:15:23 +00:00
Luis Ramos
459959c068
Remove code related to spree promotions
2020-11-04 12:15:23 +00:00
Luis Ramos
cf7d8067df
Fix easy rubocop issues
2020-11-04 12:15:23 +00:00
Luis Ramos
e9f76cb339
Remove some dead code (Config.track_inventory_levels), remove variant.cost_price= so that localized number is seen, and fix specs
2020-11-04 12:15:23 +00:00
Luis Ramos
b68c5ee0f9
Remove dead code (prototypes) and fix specs
2020-11-04 12:15:23 +00:00
Luis Ramos
2f8198eecc
Fix some easy rubocop issues
2020-11-04 12:15:23 +00:00
Luis Ramos
f85044e035
Run rubocop autocorrect
2020-11-04 12:15:23 +00:00
Luis Ramos
751beceb34
Merge decorators with original spree files
2020-11-04 12:15:23 +00:00
Luis Ramos
8cb75fc6d8
Bring models from spree_core: Spree::Product and Spree::Variant!
...
EPIC COMMIT ALERT :-)
2020-11-04 12:15:23 +00:00
Luis Ramos
9a9b455e66
Fix problem in default_tax related to sum in active record
2020-10-30 10:12:56 +00:00
Luis Ramos
6755354196
Convert relation to_a to be able to use sum
2020-10-30 10:12:56 +00:00
Luis Ramos
cc1b4123b7
Make model_set handle collections that are relations and not arrays
2020-10-30 10:10:54 +00:00
Luis Ramos
1dace1f0e3
Make quantifier use stock_items relation and not an array because sum will behave differently with an array in rails 4.1
2020-10-30 10:10:54 +00:00
Andy Brett
cb3ea133e9
add available units to instance prefs page
2020-10-29 09:17:31 -07:00
Luis Ramos
3730d76b44
Merge pull request #6155 from arku/perf/model-specs
...
Improve model specs' performance
2020-10-28 21:06:10 +00:00
Matt-Yorkley
df3ac0394c
Fix #s3_credentials
2020-10-25 14:04:33 +00:00
Matt-Yorkley
28590fdad4
Merge pull request #6223 from luisramos0/image_default_styles
...
Update image default styles
2020-10-22 17:54:32 +02:00
Matt-Yorkley
489529d30e
Merge pull request #5729 from luisramos0/image_settings
...
Remove Image settings page and standardise Paperclip styles
2020-10-22 15:58:14 +02:00
Luis Ramos
032075c04a
Merge pull request #6119 from arku/chore/fire-event-removal
...
Remove fire_event method usage
2020-10-21 21:21:35 +01:00
Matt-Yorkley
eb026f2e22
Use "sRBG" colourspace.
...
This seems to be the correct setting, and fixes a bug with the colouring of uploaded images. Further details:
https://imagemagick.org/script/color-management.php
https://www.imagemagick.org/discourse-server/viewtopic.php?t=20501
2020-10-21 14:26:26 +01:00
Matt-Yorkley
92d6168a14
Don't restrict image filetypes to JPG
2020-10-21 13:42:07 +01:00
Matt-Yorkley
f5ce0d501d
Merge pull request #5870 from luisramos0/prefs
...
[Bye bye Spree] Bring models app_configuration and preference from spree_core
2020-10-20 21:12:54 +02:00
Luis Ramos
b267f542d1
Merge pull request #5980 from luisramos0/spree_clean_up
...
[Bye bye spree] Some clean up fixes to make it all work without spree
2020-10-20 18:52:54 +01:00
Luis Ramos
3dc3e0970e
Update image default styles
2020-10-20 11:31:01 +01:00
Luis Ramos
10ed1f04c1
Revert default styles to what they were before, we can do this in a separate PR
2020-10-20 11:25:55 +01:00
Luis Ramos
16f9ef4ace
Simplify method
2020-10-20 11:20:37 +01:00
Luis Ramos
f4d8bdc17e
Fix easy rubocop issues
2020-10-20 11:20:37 +01:00
Luis Ramos
f3490e5668
Replace Spree::Image with self
2020-10-20 11:20:37 +01:00
Luis Ramos
7cf6518175
Set default values for styles directly in the attachment property without using Spree::Config
...
Only use ENV vars for attachment path and url coming from ofn-install
2020-10-20 11:20:37 +01:00
Luis Ramos
d15abe14d1
Join reformat styles and set attachement definitions and explain why we need to run them every time Spree::Image is loaded although this is also done in the spree initializer
2020-10-20 11:20:37 +01:00
Luis Ramos
6151c7420b
Move S3 attachment definitions to Spree::Image
2020-10-20 11:20:37 +01:00
Luis Ramos
fdd7049857
Reuse Spree::Image.set_attachment_definitions
2020-10-20 11:20:37 +01:00
Luis Ramos
98c5fdcf26
Reuse some code from Spree::Image in the spree initializer and extract some code to a class method so we can reuse afterwards
2020-10-20 11:20:37 +01:00