spree_skroutz 1.1.0 → 1.1.1
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 +4 -4
- data/README.md +28 -21
- data/app/assets/config/spree_skroutz_manifest.js +0 -1
- data/app/views/spree_skroutz/products.xml.builder +4 -4
- data/config/initializers/spree.rb +1 -1
- data/config/locales/el.yml +1 -1
- data/config/locales/en.yml +1 -1
- data/lib/spree_skroutz/engine.rb +2 -2
- data/lib/spree_skroutz/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5394f1db7c5d89f7ec1dd5607d30e0248c0df759f2445a773e37904568e6ac36
|
|
4
|
+
data.tar.gz: 4d4abdf6d863abae7ad7a7d0136b6d0ed3e2746d31074ccafe7f0d2cf9e7b354
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fdda074e62c392f2c7825404d1da9a5bfa350069083bbf78d99cad7e9682fa157b90c8ac5521ec9fea01202b100fcb52b331a64e571a94ab339a99951351c727
|
|
7
|
+
data.tar.gz: e5fbaa92f72de6b865e7bc3dcd08af094c3664cb474739f62065898afb7cb2a327992515d6b6856f5b44eda92cfb90e2e08d351b4e4e613f6343c5cf262ad5f8
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Spree Skroutz
|
|
2
2
|
|
|
3
3
|
This is a Skroutz extension for [Spree Commerce](https://spreecommerce.org), an open‑source e-commerce platform built with Ruby on Rails. It adds the ability to provide products listings to Skroutz Martketplace.
|
|
4
4
|
|
|
@@ -6,51 +6,58 @@ This is a Skroutz extension for [Spree Commerce](https://spreecommerce.org), an
|
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
1. Add this extension to your Gemfile:
|
|
9
|
+
1. Add this extension to your Gemfile with this line:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
bundle add spree_skroutz
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
2. Restart your server
|
|
15
|
+
2. Restart your server
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
To use your Skroutz endpoint as a data source in Skroutz Merchants:
|
|
20
|
+
|
|
21
|
+
1. **Deploy your endpoint**
|
|
22
|
+
Ensure your authentication and data endpoints are publicly accessible and return the required data format (e.g., XML, CSV, or JSON).
|
|
23
|
+
For this extension, your endpoint will typically be:
|
|
24
|
+
`https://yoursite.com/skroutz/products.xml`
|
|
25
|
+
|
|
26
|
+
2. **Copy your endpoint URL**
|
|
27
|
+
This is the URL that Skroutz Merchants will fetch data from.
|
|
28
|
+
|
|
29
|
+
3. **Add as a data feed in Skroutz Merchants**
|
|
30
|
+
- Go to [Skroutz Merchants](https://merchants.skroutz.gr/).
|
|
31
|
+
- In the header, click **Settings & tools**.
|
|
32
|
+
- Select **Data sources**.
|
|
33
|
+
- Click **Add product source**.
|
|
34
|
+
- Enter your endpoint URL (e.g., `https://yoursite.com/skroutz/products.xml`) as the feed source.
|
|
35
|
+
- Set fetch frequency and credentials if authentication is required.
|
|
16
36
|
|
|
17
37
|
## Developing
|
|
18
38
|
|
|
19
|
-
1. Create a dummy app
|
|
39
|
+
1. Create a dummy app
|
|
20
40
|
|
|
21
41
|
```bash
|
|
22
42
|
bundle update
|
|
23
43
|
bundle exec rake test_app
|
|
24
44
|
```
|
|
25
45
|
|
|
26
|
-
2. Add code
|
|
46
|
+
2. Add your new code
|
|
27
47
|
|
|
28
|
-
3. Run tests
|
|
48
|
+
3. Run tests
|
|
29
49
|
|
|
30
50
|
```bash
|
|
31
51
|
bundle exec rspec
|
|
32
52
|
```
|
|
33
53
|
|
|
34
|
-
When testing your
|
|
54
|
+
When testing your applications integration with this extension you may use it's factories.
|
|
55
|
+
Simply add this require statement to your spec_helper:
|
|
35
56
|
|
|
36
57
|
```ruby
|
|
37
58
|
require 'spree_skroutz/factories'
|
|
38
59
|
```
|
|
39
60
|
|
|
40
|
-
## Testing
|
|
41
|
-
|
|
42
|
-
Generate the test app:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
bundle exec rake test_app
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Then run:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
bundle exec rspec
|
|
52
|
-
```
|
|
53
|
-
|
|
54
61
|
## Releasing a new version
|
|
55
62
|
|
|
56
63
|
```bash
|
|
@@ -35,7 +35,7 @@ xml.mywebstore do
|
|
|
35
35
|
xml.cdata! product_breadcrumb_taxons(product).map(&:name).join(' > ')
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
xml.tag! "price_with_vat", format('%.2f', product.
|
|
38
|
+
xml.tag! "price_with_vat", format('%.2f', product.display_price.to_d)
|
|
39
39
|
|
|
40
40
|
if product.tax_category.present?
|
|
41
41
|
tax_rate = product.tax_category.tax_rates.first
|
|
@@ -46,9 +46,9 @@ xml.mywebstore do
|
|
|
46
46
|
|
|
47
47
|
xml.tag! "availability", product.in_stock? ? "In stock" : "Out of stock"
|
|
48
48
|
|
|
49
|
-
if product.
|
|
49
|
+
if product.brand_taxon.present?
|
|
50
50
|
xml.tag! "manufacturer" do
|
|
51
|
-
xml.cdata! product.
|
|
51
|
+
xml.cdata! product.brand_taxon.name
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -81,7 +81,7 @@ xml.mywebstore do
|
|
|
81
81
|
xml.tag! "variationid", variant.id
|
|
82
82
|
xml.tag! "availability", variant.in_stock? ? "In stock" : "Out of stock"
|
|
83
83
|
xml.tag! "ean", variant.barcode if variant.barcode.present?
|
|
84
|
-
xml.tag! "price_with_vat", format('%.2f', variant.
|
|
84
|
+
xml.tag! "price_with_vat", format('%.2f', variant.display_price.to_d)
|
|
85
85
|
|
|
86
86
|
size = variant.option_values.select{|ov| ov.option_type.name.downcase == 'size' }
|
|
87
87
|
.map(&:presentation)
|
data/config/locales/el.yml
CHANGED
data/config/locales/en.yml
CHANGED
data/lib/spree_skroutz/engine.rb
CHANGED
|
@@ -17,8 +17,8 @@ module SpreeSkroutz
|
|
|
17
17
|
app.config.assets.precompile += %w[spree_skroutz_manifest]
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
initializer 'spree_skroutz.importmap',
|
|
21
|
-
app.config.
|
|
20
|
+
initializer 'spree_skroutz.importmap', before: 'importmap' do |app|
|
|
21
|
+
app.config.importmap.paths << root.join('config/importmap.rb')
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def self.activate
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_skroutz
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OlympusOne
|
|
@@ -15,42 +15,42 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 5.
|
|
18
|
+
version: 5.2.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 5.
|
|
25
|
+
version: 5.2.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: spree_storefront
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 5.
|
|
32
|
+
version: 5.2.0
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 5.
|
|
39
|
+
version: 5.2.0
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: spree_admin
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
|
43
43
|
requirements:
|
|
44
44
|
- - ">="
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: 5.
|
|
46
|
+
version: 5.2.0
|
|
47
47
|
type: :runtime
|
|
48
48
|
prerelease: false
|
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
50
|
requirements:
|
|
51
51
|
- - ">="
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: 5.
|
|
53
|
+
version: 5.2.0
|
|
54
54
|
- !ruby/object:Gem::Dependency
|
|
55
55
|
name: spree_extension
|
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -79,7 +79,7 @@ dependencies:
|
|
|
79
79
|
- - ">="
|
|
80
80
|
- !ruby/object:Gem::Version
|
|
81
81
|
version: '0'
|
|
82
|
-
description: Adds the ability to provide products listings to Skroutz
|
|
82
|
+
description: Adds the ability to provide products listings to Skroutz Merchants.
|
|
83
83
|
email: info@olympusone.com
|
|
84
84
|
executables: []
|
|
85
85
|
extensions: []
|
|
@@ -108,10 +108,10 @@ licenses:
|
|
|
108
108
|
- AGPL-3.0-or-later
|
|
109
109
|
metadata:
|
|
110
110
|
bug_tracker_uri: https://github.com/olympusone/spree_skroutz/issues
|
|
111
|
-
changelog_uri: https://github.com/olympusone/spree_skroutz/releases/tag/v1.1.
|
|
111
|
+
changelog_uri: https://github.com/olympusone/spree_skroutz/releases/tag/v1.1.1
|
|
112
112
|
documentation_uri: https://github.com/olympusone/spree_skroutz
|
|
113
113
|
homepage_uri: https://github.com/olympusone/spree_skroutz
|
|
114
|
-
source_code_uri: https://github.com/olympusone/spree_skroutz/tree/v1.1.
|
|
114
|
+
source_code_uri: https://github.com/olympusone/spree_skroutz/tree/v1.1.1
|
|
115
115
|
rdoc_options: []
|
|
116
116
|
require_paths:
|
|
117
117
|
- lib
|