e_plat 1.1.0.pre.rc.4 → 1.1.0.pre.rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5500aebf0ece97bc0a4447957d7bb5f57287d3708adc09557e50fc9f4e1e9da
4
- data.tar.gz: d37a93b36eabe2438446fa8ec3dccca2d28889f06ffd916ec61dda399b4fab11
3
+ metadata.gz: 2206781bbf8868908c0e96fe7c14598796565160e8dda1552dcb039f15dc42de
4
+ data.tar.gz: '08d8237e1f2117e6b2d732b22450f770ff19525701b150e734021119332adeea'
5
5
  SHA512:
6
- metadata.gz: b5580cf62051ceec84545370ecb86b095a1ac8827548f15b3a32d6e099356ef59ca3abd2a9feabd1977e350b7c956a01b3e32bbe23abc7c29a17b3e7fd5f8b72
7
- data.tar.gz: fc84197faf1483d6e16a9c0d09d403083c06e5ca9bd59a36c3dcfbab7d7256bd2cb48f0798baac48eb5c662c18334f071f512c2a76bc5f0825d5b9d6c96dccf1
6
+ metadata.gz: 16d8aef337c863094e137d709a9180fb313570de1df5b8a80083b448a98846bac6afe0b762fdf7a7f79e4c05dc3666eaf91bc7cafd26db4991eb5fccd2a3b265
7
+ data.tar.gz: 898f2f7cbd29a897dce7d790800a20523d13579955f548471e1482ec78588c002b373b52b90606ccbde113a85aca792ac7e76d238d8e8d49510488feb1e6cebd
data/README.md CHANGED
@@ -298,7 +298,7 @@ EPlat is designed to let you mostly use it's universal interface, but then easil
298
298
  |----------------------|----------|------------------------------------------|------------------------------------|-----------------------------------|
299
299
  | id | integer | * | id | id |
300
300
  | title | string | * | option_values&.map(&:label)&.join(' ') | attributes.map(&:option).join(' ') |
301
- | price | string | * | calculated_price | sale_price |
301
+ | price | string | * | calculated_price | gets `price`, sets `regular_price` |
302
302
  | sku | string | * | sku | sku |
303
303
  | position | integer | * | nil | menu_order |
304
304
  | inventory_policy | string | * | nil | backorders |
@@ -321,7 +321,7 @@ EPlat is designed to let you mostly use it's universal interface, but then easil
321
321
  * Bigcommerce variant.title= and variant.price= setters are not supported. They're a result of the option values instead.
322
322
  * WooCommerce variant.title= setter is not supported. It's result of the option values instead.
323
323
  ** WooCommerce calls variants 'variations', EPlat refers to them as variants.
324
- *** It's possible for Woo products to have 0 variants, in this situation we generate a virtual one.
324
+ *** It's possible for Woo products to have 0 variants, in this situation we generate a virtual one with an `id` of `0` and `.virtual? == true`.
325
325
  ```
326
326
 
327
327
  helper methods: <br>
@@ -58,9 +58,6 @@ module EPlat
58
58
  {
59
59
  existing_entry: {native_key: "id", e_plat_key: "id"}
60
60
  },
61
- {
62
- existing_entry: {native_key: "price", e_plat_key: "price"}
63
- },
64
61
  {
65
62
  existing_entry: {native_key: "sku", e_plat_key: "sku"}
66
63
  },
@@ -90,9 +87,13 @@ module EPlat
90
87
  }
91
88
  },
92
89
  {
93
- alias_attribute: {
94
- native_key: "sale_price",
95
- e_plat_key: "price"
90
+ existing_entry: {native_key: "price", e_plat_key: "price",
91
+ custom_e_plat_getter: "-> (value) {
92
+ value || product&.price
93
+ }",
94
+ custom_native_setter: "-> (value) {
95
+ self.sale_price = value; value
96
+ }"
96
97
  }
97
98
  },
98
99
  {
@@ -1,3 +1,3 @@
1
1
  module EPlat
2
- VERSION = "1.1.0-rc.4"
2
+ VERSION = "1.1.0-rc.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: e_plat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.pre.rc.4
4
+ version: 1.1.0.pre.rc.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - oliwoodsuk