spree_frontend 4.4.0 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +48 -35
- data/.eslintrc +1 -1
- data/Gemfile +4 -8
- data/README.md +56 -2
- data/app/assets/config/spree_frontend_manifest.js +1 -0
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/logo/spree_50.png +0 -0
- data/app/assets/images/logo-spree.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/logo.svg +10 -1
- data/app/assets/images/logo@2x.png +0 -0
- data/app/assets/images/logo@3x.png +0 -0
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/plp.png +0 -0
- data/app/assets/images/noimage/plp.svg +13 -20
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/javascripts/spree/{api → frontend/api}/main.js +4 -4
- data/app/assets/javascripts/spree/{api → frontend/api}/storefront/cart.js +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/address.js +3 -3
- data/app/assets/javascripts/spree/frontend/currency.js +6 -7
- data/app/assets/javascripts/spree/frontend/locale.es6 +1 -2
- data/app/assets/javascripts/{spree.js → spree/frontend/main.js} +5 -5
- data/app/assets/javascripts/spree/frontend/{turbolinks_scroll_fix.js → turbo_scroll_fix.js} +3 -3
- data/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +8 -8
- data/app/assets/javascripts/spree/frontend/views/spree/products/description.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +1 -1
- data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +4 -4
- data/app/assets/javascripts/spree/frontend/views/spree/shared/variant_select.js +3 -3
- data/app/assets/javascripts/spree/frontend.js +10 -17
- data/app/controllers/spree/addresses_controller.rb +2 -2
- data/app/controllers/spree/checkout_controller.rb +2 -2
- data/app/controllers/spree/locale_controller.rb +7 -1
- data/app/controllers/spree/orders_controller.rb +1 -1
- data/app/controllers/spree/products_controller.rb +1 -1
- data/app/controllers/spree/taxons_controller.rb +1 -1
- data/app/helpers/spree/frontend_helper.rb +14 -8
- data/app/helpers/spree/navigation_helper.rb +1 -1
- data/app/helpers/spree/products_filters_helper.rb +1 -1
- data/app/services/spree/build_localized_redirect_url.rb +48 -8
- data/app/views/spree/addresses/new.html.erb +1 -1
- data/app/views/spree/checkout/edit.html.erb +1 -1
- data/app/views/spree/checkout/registration.html.erb +1 -1
- data/app/views/spree/orders/_line_item.html.erb +1 -1
- data/app/views/spree/orders/_line_item_data.html.erb +1 -1
- data/app/views/spree/products/_color_option_type.html.erb +2 -2
- data/app/views/spree/products/_filters_desktop.html.erb +3 -3
- data/app/views/spree/products/_filters_mobile.html.erb +2 -2
- data/app/views/spree/products/_thumbnails.html.erb +2 -2
- data/app/views/spree/shared/_head.html.erb +3 -2
- data/app/views/spree/shared/_line_item.html.erb +1 -1
- data/app/views/spree/shared/_link_to_account.html.erb +1 -1
- data/app/views/spree/shared/_login.html.erb +1 -1
- data/app/views/spree/shared/_main_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +1 -1
- data/app/views/spree/shared/_translations.html.erb +1 -1
- data/app/views/spree/shared/carousel/_single.html.erb +2 -2
- data/app/views/spree/shared/carousel/_thumbnails.html.erb +1 -1
- data/app/views/spree/shared/cms/sections/_hero_image.html.erb +9 -9
- data/app/views/spree/shared/cms/sections/_image_gallery.html.erb +21 -21
- data/app/views/spree/shared/cms/sections/_side_by_side_images.html.erb +14 -14
- data/app/views/spree/taxons/_header.html.erb +1 -1
- data/app/views/spree/users/_address_controls.html.erb +1 -1
- data/lib/generators/spree/frontend/install/install_generator.rb +1 -1
- data/lib/spree/frontend/configuration.rb +18 -0
- data/lib/spree/frontend/engine.rb +3 -8
- data/lib/spree/frontend/version.rb +1 -1
- data/lib/spree/frontend.rb +2 -1
- data/spree_frontend.gemspec +4 -2
- metadata +49 -278
- data/app/assets/images/flags/4x3/ad.svg +0 -150
- data/app/assets/images/flags/4x3/ae.svg +0 -6
- data/app/assets/images/flags/4x3/af.svg +0 -81
- data/app/assets/images/flags/4x3/ag.svg +0 -14
- data/app/assets/images/flags/4x3/ai.svg +0 -763
- data/app/assets/images/flags/4x3/al.svg +0 -5
- data/app/assets/images/flags/4x3/am.svg +0 -5
- data/app/assets/images/flags/4x3/ao.svg +0 -13
- data/app/assets/images/flags/4x3/aq.svg +0 -5
- data/app/assets/images/flags/4x3/ar.svg +0 -31
- data/app/assets/images/flags/4x3/as.svg +0 -33
- data/app/assets/images/flags/4x3/at.svg +0 -6
- data/app/assets/images/flags/4x3/au.svg +0 -9
- data/app/assets/images/flags/4x3/aw.svg +0 -186
- data/app/assets/images/flags/4x3/ax.svg +0 -18
- data/app/assets/images/flags/4x3/az.svg +0 -8
- data/app/assets/images/flags/4x3/ba.svg +0 -12
- data/app/assets/images/flags/4x3/bb.svg +0 -6
- data/app/assets/images/flags/4x3/bd.svg +0 -4
- data/app/assets/images/flags/4x3/be.svg +0 -7
- data/app/assets/images/flags/4x3/bf.svg +0 -7
- data/app/assets/images/flags/4x3/bg.svg +0 -7
- data/app/assets/images/flags/4x3/bh.svg +0 -9
- data/app/assets/images/flags/4x3/bi.svg +0 -15
- data/app/assets/images/flags/4x3/bj.svg +0 -14
- data/app/assets/images/flags/4x3/bl.svg +0 -7
- data/app/assets/images/flags/4x3/bm.svg +0 -98
- data/app/assets/images/flags/4x3/bn.svg +0 -36
- data/app/assets/images/flags/4x3/bo.svg +0 -676
- data/app/assets/images/flags/4x3/bq.svg +0 -5
- data/app/assets/images/flags/4x3/br.svg +0 -45
- data/app/assets/images/flags/4x3/bs.svg +0 -13
- data/app/assets/images/flags/4x3/bt.svg +0 -89
- data/app/assets/images/flags/4x3/bv.svg +0 -13
- data/app/assets/images/flags/4x3/bw.svg +0 -7
- data/app/assets/images/flags/4x3/by.svg +0 -20
- data/app/assets/images/flags/4x3/bz.svg +0 -145
- data/app/assets/images/flags/4x3/ca.svg +0 -4
- data/app/assets/images/flags/4x3/cc.svg +0 -19
- data/app/assets/images/flags/4x3/cd.svg +0 -5
- data/app/assets/images/flags/4x3/cf.svg +0 -15
- data/app/assets/images/flags/4x3/cg.svg +0 -12
- data/app/assets/images/flags/4x3/ch.svg +0 -9
- data/app/assets/images/flags/4x3/ci.svg +0 -7
- data/app/assets/images/flags/4x3/ck.svg +0 -9
- data/app/assets/images/flags/4x3/cl.svg +0 -13
- data/app/assets/images/flags/4x3/cm.svg +0 -15
- data/app/assets/images/flags/4x3/cn.svg +0 -11
- data/app/assets/images/flags/4x3/co.svg +0 -7
- data/app/assets/images/flags/4x3/cr.svg +0 -7
- data/app/assets/images/flags/4x3/cu.svg +0 -13
- data/app/assets/images/flags/4x3/cv.svg +0 -13
- data/app/assets/images/flags/4x3/cw.svg +0 -14
- data/app/assets/images/flags/4x3/cx.svg +0 -15
- data/app/assets/images/flags/4x3/cy.svg +0 -6
- data/app/assets/images/flags/4x3/cz.svg +0 -5
- data/app/assets/images/flags/4x3/de.svg +0 -5
- data/app/assets/images/flags/4x3/dj.svg +0 -13
- data/app/assets/images/flags/4x3/dk.svg +0 -5
- data/app/assets/images/flags/4x3/dm.svg +0 -152
- data/app/assets/images/flags/4x3/do.svg +0 -6745
- data/app/assets/images/flags/4x3/dz.svg +0 -5
- data/app/assets/images/flags/4x3/ec.svg +0 -138
- data/app/assets/images/flags/4x3/ee.svg +0 -7
- data/app/assets/images/flags/4x3/eg.svg +0 -38
- data/app/assets/images/flags/4x3/eh.svg +0 -15
- data/app/assets/images/flags/4x3/er.svg +0 -8
- data/app/assets/images/flags/4x3/es-ca.svg +0 -4
- data/app/assets/images/flags/4x3/es.svg +0 -544
- data/app/assets/images/flags/4x3/et.svg +0 -14
- data/app/assets/images/flags/4x3/eu.svg +0 -28
- data/app/assets/images/flags/4x3/fi.svg +0 -5
- data/app/assets/images/flags/4x3/fj.svg +0 -122
- data/app/assets/images/flags/4x3/fk.svg +0 -90
- data/app/assets/images/flags/4x3/fm.svg +0 -11
- data/app/assets/images/flags/4x3/fo.svg +0 -12
- data/app/assets/images/flags/4x3/fr.svg +0 -7
- data/app/assets/images/flags/4x3/ga.svg +0 -7
- data/app/assets/images/flags/4x3/gb-eng.svg +0 -5
- data/app/assets/images/flags/4x3/gb-nir.svg +0 -132
- data/app/assets/images/flags/4x3/gb-sct.svg +0 -4
- data/app/assets/images/flags/4x3/gb-wls.svg +0 -9
- data/app/assets/images/flags/4x3/gb.svg +0 -7
- data/app/assets/images/flags/4x3/gd.svg +0 -27
- data/app/assets/images/flags/4x3/ge.svg +0 -6
- data/app/assets/images/flags/4x3/gf.svg +0 -7
- data/app/assets/images/flags/4x3/gg.svg +0 -9
- data/app/assets/images/flags/4x3/gh.svg +0 -6
- data/app/assets/images/flags/4x3/gi.svg +0 -32
- data/app/assets/images/flags/4x3/gl.svg +0 -4
- data/app/assets/images/flags/4x3/gm.svg +0 -14
- data/app/assets/images/flags/4x3/gn.svg +0 -7
- data/app/assets/images/flags/4x3/gp.svg +0 -7
- data/app/assets/images/flags/4x3/gq.svg +0 -23
- data/app/assets/images/flags/4x3/gr.svg +0 -16
- data/app/assets/images/flags/4x3/gs.svg +0 -201
- data/app/assets/images/flags/4x3/gt.svg +0 -204
- data/app/assets/images/flags/4x3/gu.svg +0 -39
- data/app/assets/images/flags/4x3/gw.svg +0 -13
- data/app/assets/images/flags/4x3/gy.svg +0 -9
- data/app/assets/images/flags/4x3/hk.svg +0 -30
- data/app/assets/images/flags/4x3/hm.svg +0 -9
- data/app/assets/images/flags/4x3/hn.svg +0 -18
- data/app/assets/images/flags/4x3/hr.svg +0 -58
- data/app/assets/images/flags/4x3/ht.svg +0 -116
- data/app/assets/images/flags/4x3/hu.svg +0 -7
- data/app/assets/images/flags/4x3/id.svg +0 -6
- data/app/assets/images/flags/4x3/ie.svg +0 -7
- data/app/assets/images/flags/4x3/il.svg +0 -14
- data/app/assets/images/flags/4x3/im.svg +0 -36
- data/app/assets/images/flags/4x3/in.svg +0 -25
- data/app/assets/images/flags/4x3/io.svg +0 -138
- data/app/assets/images/flags/4x3/iq.svg +0 -10
- data/app/assets/images/flags/4x3/ir.svg +0 -219
- data/app/assets/images/flags/4x3/is.svg +0 -12
- data/app/assets/images/flags/4x3/it.svg +0 -7
- data/app/assets/images/flags/4x3/je.svg +0 -29
- data/app/assets/images/flags/4x3/jm.svg +0 -8
- data/app/assets/images/flags/4x3/jo.svg +0 -16
- data/app/assets/images/flags/4x3/jp.svg +0 -11
- data/app/assets/images/flags/4x3/ke.svg +0 -23
- data/app/assets/images/flags/4x3/kg.svg +0 -15
- data/app/assets/images/flags/4x3/kh.svg +0 -61
- data/app/assets/images/flags/4x3/ki.svg +0 -36
- data/app/assets/images/flags/4x3/km.svg +0 -16
- data/app/assets/images/flags/4x3/kn.svg +0 -14
- data/app/assets/images/flags/4x3/kp.svg +0 -15
- data/app/assets/images/flags/4x3/kr.svg +0 -24
- data/app/assets/images/flags/4x3/kw.svg +0 -13
- data/app/assets/images/flags/4x3/ky.svg +0 -63
- data/app/assets/images/flags/4x3/kz.svg +0 -23
- data/app/assets/images/flags/4x3/la.svg +0 -12
- data/app/assets/images/flags/4x3/lb.svg +0 -15
- data/app/assets/images/flags/4x3/lc.svg +0 -8
- data/app/assets/images/flags/4x3/li.svg +0 -43
- data/app/assets/images/flags/4x3/lk.svg +0 -22
- data/app/assets/images/flags/4x3/lr.svg +0 -14
- data/app/assets/images/flags/4x3/ls.svg +0 -8
- data/app/assets/images/flags/4x3/lt.svg +0 -7
- data/app/assets/images/flags/4x3/lu.svg +0 -5
- data/app/assets/images/flags/4x3/lv.svg +0 -6
- data/app/assets/images/flags/4x3/ly.svg +0 -13
- data/app/assets/images/flags/4x3/ma.svg +0 -4
- data/app/assets/images/flags/4x3/mc.svg +0 -6
- data/app/assets/images/flags/4x3/md.svg +0 -70
- data/app/assets/images/flags/4x3/me.svg +0 -116
- data/app/assets/images/flags/4x3/mf.svg +0 -7
- data/app/assets/images/flags/4x3/mg.svg +0 -7
- data/app/assets/images/flags/4x3/mh.svg +0 -7
- data/app/assets/images/flags/4x3/mk.svg +0 -5
- data/app/assets/images/flags/4x3/ml.svg +0 -7
- data/app/assets/images/flags/4x3/mm.svg +0 -16
- data/app/assets/images/flags/4x3/mn.svg +0 -13
- data/app/assets/images/flags/4x3/mo.svg +0 -9
- data/app/assets/images/flags/4x3/mp.svg +0 -86
- data/app/assets/images/flags/4x3/mq.svg +0 -7
- data/app/assets/images/flags/4x3/mr.svg +0 -6
- data/app/assets/images/flags/4x3/ms.svg +0 -78
- data/app/assets/images/flags/4x3/mt.svg +0 -49
- data/app/assets/images/flags/4x3/mu.svg +0 -8
- data/app/assets/images/flags/4x3/mv.svg +0 -6
- data/app/assets/images/flags/4x3/mw.svg +0 -10
- data/app/assets/images/flags/4x3/mx.svg +0 -382
- data/app/assets/images/flags/4x3/my.svg +0 -15
- data/app/assets/images/flags/4x3/mz.svg +0 -21
- data/app/assets/images/flags/4x3/na.svg +0 -16
- data/app/assets/images/flags/4x3/nc.svg +0 -14
- data/app/assets/images/flags/4x3/ne.svg +0 -6
- data/app/assets/images/flags/4x3/nf.svg +0 -9
- data/app/assets/images/flags/4x3/ng.svg +0 -6
- data/app/assets/images/flags/4x3/ni.svg +0 -129
- data/app/assets/images/flags/4x3/nl.svg +0 -5
- data/app/assets/images/flags/4x3/no.svg +0 -7
- data/app/assets/images/flags/4x3/np.svg +0 -14
- data/app/assets/images/flags/4x3/nr.svg +0 -12
- data/app/assets/images/flags/4x3/nu.svg +0 -26
- data/app/assets/images/flags/4x3/nz.svg +0 -41
- data/app/assets/images/flags/4x3/om.svg +0 -115
- data/app/assets/images/flags/4x3/pa.svg +0 -14
- data/app/assets/images/flags/4x3/pe.svg +0 -244
- data/app/assets/images/flags/4x3/pf.svg +0 -19
- data/app/assets/images/flags/4x3/pg.svg +0 -9
- data/app/assets/images/flags/4x3/ph.svg +0 -9
- data/app/assets/images/flags/4x3/pk.svg +0 -15
- data/app/assets/images/flags/4x3/pl.svg +0 -6
- data/app/assets/images/flags/4x3/pm.svg +0 -7
- data/app/assets/images/flags/4x3/pn.svg +0 -62
- data/app/assets/images/flags/4x3/pr.svg +0 -13
- data/app/assets/images/flags/4x3/ps.svg +0 -15
- data/app/assets/images/flags/4x3/pt.svg +0 -57
- data/app/assets/images/flags/4x3/pw.svg +0 -11
- data/app/assets/images/flags/4x3/py.svg +0 -157
- data/app/assets/images/flags/4x3/qa.svg +0 -4
- data/app/assets/images/flags/4x3/re.svg +0 -7
- data/app/assets/images/flags/4x3/ro.svg +0 -7
- data/app/assets/images/flags/4x3/rs.svg +0 -292
- data/app/assets/images/flags/4x3/ru.svg +0 -7
- data/app/assets/images/flags/4x3/rw.svg +0 -13
- data/app/assets/images/flags/4x3/sa.svg +0 -26
- data/app/assets/images/flags/4x3/sb.svg +0 -13
- data/app/assets/images/flags/4x3/sc.svg +0 -14
- data/app/assets/images/flags/4x3/sd.svg +0 -13
- data/app/assets/images/flags/4x3/se.svg +0 -5
- data/app/assets/images/flags/4x3/sg.svg +0 -13
- data/app/assets/images/flags/4x3/sh.svg +0 -74
- data/app/assets/images/flags/4x3/si.svg +0 -18
- data/app/assets/images/flags/4x3/sj.svg +0 -7
- data/app/assets/images/flags/4x3/sk.svg +0 -9
- data/app/assets/images/flags/4x3/sl.svg +0 -7
- data/app/assets/images/flags/4x3/sm.svg +0 -91
- data/app/assets/images/flags/4x3/sn.svg +0 -8
- data/app/assets/images/flags/4x3/so.svg +0 -11
- data/app/assets/images/flags/4x3/sr.svg +0 -6
- data/app/assets/images/flags/4x3/ss.svg +0 -8
- data/app/assets/images/flags/4x3/st.svg +0 -16
- data/app/assets/images/flags/4x3/sv.svg +0 -594
- data/app/assets/images/flags/4x3/sx.svg +0 -56
- data/app/assets/images/flags/4x3/sy.svg +0 -6
- data/app/assets/images/flags/4x3/sz.svg +0 -45
- data/app/assets/images/flags/4x3/tc.svg +0 -67
- data/app/assets/images/flags/4x3/td.svg +0 -7
- data/app/assets/images/flags/4x3/tf.svg +0 -15
- data/app/assets/images/flags/4x3/tg.svg +0 -14
- data/app/assets/images/flags/4x3/th.svg +0 -7
- data/app/assets/images/flags/4x3/tj.svg +0 -22
- data/app/assets/images/flags/4x3/tk.svg +0 -5
- data/app/assets/images/flags/4x3/tl.svg +0 -13
- data/app/assets/images/flags/4x3/tm.svg +0 -206
- data/app/assets/images/flags/4x3/tn.svg +0 -13
- data/app/assets/images/flags/4x3/to.svg +0 -10
- data/app/assets/images/flags/4x3/tr.svg +0 -8
- data/app/assets/images/flags/4x3/tt.svg +0 -5
- data/app/assets/images/flags/4x3/tv.svg +0 -16
- data/app/assets/images/flags/4x3/tw.svg +0 -14
- data/app/assets/images/flags/4x3/tz.svg +0 -13
- data/app/assets/images/flags/4x3/ua.svg +0 -6
- data/app/assets/images/flags/4x3/ug.svg +0 -30
- data/app/assets/images/flags/4x3/um.svg +0 -15
- data/app/assets/images/flags/4x3/un.svg +0 -16
- data/app/assets/images/flags/4x3/us.svg +0 -10
- data/app/assets/images/flags/4x3/uy.svg +0 -28
- data/app/assets/images/flags/4x3/uz.svg +0 -30
- data/app/assets/images/flags/4x3/va.svg +0 -479
- data/app/assets/images/flags/4x3/vc.svg +0 -8
- data/app/assets/images/flags/4x3/ve.svg +0 -26
- data/app/assets/images/flags/4x3/vg.svg +0 -127
- data/app/assets/images/flags/4x3/vi.svg +0 -28
- data/app/assets/images/flags/4x3/vn.svg +0 -11
- data/app/assets/images/flags/4x3/vu.svg +0 -18
- data/app/assets/images/flags/4x3/wf.svg +0 -7
- data/app/assets/images/flags/4x3/ws.svg +0 -7
- data/app/assets/images/flags/4x3/xk.svg +0 -16
- data/app/assets/images/flags/4x3/ye.svg +0 -7
- data/app/assets/images/flags/4x3/yt.svg +0 -7
- data/app/assets/images/flags/4x3/za.svg +0 -17
- data/app/assets/images/flags/4x3/zm.svg +0 -27
- data/app/assets/images/flags/4x3/zw.svg +0 -21
- data/app/models/spree/frontend_configuration.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e47fb4519b72315d61a790677b3592cf1d03cebaa77a8b4f483a5cad9bfb8573
|
4
|
+
data.tar.gz: 1ccd7a7756fcd9a45df1de4881128621a1dc4dba0f95db9ad287a0e3cc88b16d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d300612e8c06e3e6444ef44922bf71912ca3bf9a2d296abca6f1e4a951c984c4af5222f5f92312c4a8471a0e5ad57d12aff42edc61d41b9667bc4f0b7782feef
|
7
|
+
data.tar.gz: ce09a386bb4c4488b3cd7369b265dfbe3cbe5578926d152e094c4437c53a30f180ad48d58aec9b38e8979fbee5a68292de4bd09265c043a07ac8bfdf5a432711
|
data/.circleci/config.yml
CHANGED
@@ -7,18 +7,19 @@ defaults: &defaults
|
|
7
7
|
BUNDLE_JOBS: 4
|
8
8
|
BUNDLE_RETRY: 3
|
9
9
|
BUNDLE_PATH: ~/spree/vendor/bundle
|
10
|
+
RAILS_VERSION: '~> 7.0'
|
10
11
|
working_directory: ~/spree
|
11
12
|
docker:
|
12
|
-
- image: &
|
13
|
+
- image: &ruby_2_7_image circleci/ruby:2.7-node-browsers
|
13
14
|
- image: &redis_image circleci/redis:6.2-alpine
|
14
15
|
|
15
|
-
|
16
|
+
defaults_3_2: &defaults_3_2
|
16
17
|
<<: *defaults
|
17
18
|
docker:
|
18
|
-
- image: &
|
19
|
+
- image: &ruby_3_2_image circleci/ruby:3.0-node-browsers
|
19
20
|
- image: *redis_image
|
20
21
|
|
21
|
-
|
22
|
+
run_tests_2_7: &run_tests_2_7
|
22
23
|
<<: *defaults
|
23
24
|
parallelism: 8
|
24
25
|
steps:
|
@@ -27,9 +28,12 @@ run_tests: &run_tests
|
|
27
28
|
keys:
|
28
29
|
- spree-storefront-old-bundle-v10-ruby-2-7-{{ .Branch }}
|
29
30
|
- spree-storefront-old-bundle-v10-ruby-2-7
|
31
|
+
- run:
|
32
|
+
name: Add keyserver
|
33
|
+
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
30
34
|
- run:
|
31
35
|
name: Install libvips
|
32
|
-
command: sudo apt-get install libvips
|
36
|
+
command: sudo apt-get update && sudo apt-get install libvips
|
33
37
|
- run:
|
34
38
|
name: Set bundle path
|
35
39
|
command: bundle config --local path vendor/bundle
|
@@ -54,18 +58,21 @@ run_tests: &run_tests
|
|
54
58
|
- store_artifacts:
|
55
59
|
path: tmp/capybara
|
56
60
|
|
57
|
-
|
58
|
-
<<: *
|
61
|
+
run_tests_3_2: &run_tests_3_2
|
62
|
+
<<: *defaults_3_2
|
59
63
|
parallelism: 8
|
60
64
|
steps:
|
61
65
|
- checkout
|
62
66
|
- restore_cache:
|
63
67
|
keys:
|
64
|
-
- spree-storefront-old-bundle-v10-ruby-3-
|
65
|
-
- spree-storefront-old-bundle-v10-ruby-3-
|
68
|
+
- spree-storefront-old-bundle-v10-ruby-3-2-{{ .Branch }}
|
69
|
+
- spree-storefront-old-bundle-v10-ruby-3-2
|
70
|
+
- run:
|
71
|
+
name: Add keyserver
|
72
|
+
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
66
73
|
- run:
|
67
74
|
name: Install libvips
|
68
|
-
command: sudo apt-get install libvips
|
75
|
+
command: sudo apt-get update && sudo apt-get install libvips
|
69
76
|
- run:
|
70
77
|
name: Set bundle path
|
71
78
|
command: bundle config --local path vendor/bundle
|
@@ -91,7 +98,7 @@ run_tests_3_0: &run_tests_3_0
|
|
91
98
|
path: tmp/capybara
|
92
99
|
|
93
100
|
jobs:
|
94
|
-
|
101
|
+
bundle_ruby_2_7:
|
95
102
|
<<: *defaults
|
96
103
|
steps:
|
97
104
|
- checkout
|
@@ -99,9 +106,12 @@ jobs:
|
|
99
106
|
keys:
|
100
107
|
- spree-storefront-old-bundle-v10-ruby-2-7-{{ .Branch }}
|
101
108
|
- spree-storefront-old-bundle-v10-ruby-2-7
|
109
|
+
- run:
|
110
|
+
name: Add keyserver
|
111
|
+
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
102
112
|
- run:
|
103
113
|
name: Install libvips
|
104
|
-
command: sudo apt-get install libvips
|
114
|
+
command: sudo apt-get update && sudo apt-get install libvips
|
105
115
|
- run:
|
106
116
|
name: Set bundle path
|
107
117
|
command: bundle config --local path vendor/bundle
|
@@ -114,17 +124,20 @@ jobs:
|
|
114
124
|
- vendor/bundle
|
115
125
|
key: spree-storefront-old-bundle-v10-ruby-2-7-{{ checksum "Gemfile.lock" }}
|
116
126
|
|
117
|
-
|
118
|
-
<<: *
|
127
|
+
bundle_ruby_3_2:
|
128
|
+
<<: *defaults_3_2
|
119
129
|
steps:
|
120
130
|
- checkout
|
121
131
|
- restore_cache:
|
122
132
|
keys:
|
123
|
-
- spree-storefront-old-bundle-v10-ruby-3-
|
124
|
-
- spree-storefront-old-bundle-v10-ruby-3-
|
133
|
+
- spree-storefront-old-bundle-v10-ruby-3-2-{{ .Branch }}
|
134
|
+
- spree-storefront-old-bundle-v10-ruby-3-2
|
135
|
+
- run:
|
136
|
+
name: Add keyserver
|
137
|
+
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
125
138
|
- run:
|
126
139
|
name: Install libvips
|
127
|
-
command: sudo apt-get install libvips
|
140
|
+
command: sudo apt-get update && sudo apt-get install libvips
|
128
141
|
- run:
|
129
142
|
name: Set bundle path
|
130
143
|
command: bundle config --local path vendor/bundle
|
@@ -135,33 +148,33 @@ jobs:
|
|
135
148
|
- save_cache:
|
136
149
|
paths:
|
137
150
|
- vendor/bundle
|
138
|
-
key: spree-storefront-old-bundle-v10-ruby-3-
|
151
|
+
key: spree-storefront-old-bundle-v10-ruby-3-2-{{ checksum "Gemfile.lock" }}
|
139
152
|
|
140
|
-
|
141
|
-
<<: *
|
153
|
+
tests_ruby_2_7_rails_7_0_postgres:
|
154
|
+
<<: *run_tests_2_7
|
142
155
|
environment: &postgres_environment
|
143
156
|
<<: *environment
|
144
157
|
DB: postgres
|
145
158
|
DB_HOST: localhost
|
146
159
|
DB_USERNAME: postgres
|
147
160
|
docker:
|
148
|
-
- image: *
|
161
|
+
- image: *ruby_2_7_image
|
149
162
|
- image: *redis_image
|
150
163
|
- image: &postgres_image circleci/postgres:12-alpine
|
151
164
|
environment:
|
152
165
|
POSTGRES_USER: postgres
|
153
166
|
|
154
|
-
|
155
|
-
<<: *
|
167
|
+
tests_ruby_3_2_rails_7_0_postgres:
|
168
|
+
<<: *run_tests_3_2
|
156
169
|
environment:
|
157
170
|
<<: *postgres_environment
|
158
171
|
docker:
|
159
|
-
- image: *
|
172
|
+
- image: *ruby_3_2_image
|
160
173
|
- image: *postgres_image
|
161
174
|
- image: *redis_image
|
162
175
|
|
163
|
-
|
164
|
-
<<: *
|
176
|
+
tests_ruby_2_7_rails_7_0_mysql:
|
177
|
+
<<: *run_tests_2_7
|
165
178
|
environment: &mysql_environment
|
166
179
|
<<: *environment
|
167
180
|
DB: mysql
|
@@ -170,7 +183,7 @@ jobs:
|
|
170
183
|
COVERAGE: true
|
171
184
|
COVERAGE_DIR: /tmp/workspace/simplecov
|
172
185
|
docker:
|
173
|
-
- image: *
|
186
|
+
- image: *ruby_2_7_image
|
174
187
|
- image: *redis_image
|
175
188
|
- image: &mysql_image circleci/mysql:8-ram
|
176
189
|
|
@@ -178,14 +191,14 @@ workflows:
|
|
178
191
|
version: 2
|
179
192
|
main:
|
180
193
|
jobs:
|
181
|
-
-
|
182
|
-
-
|
183
|
-
-
|
194
|
+
- bundle_ruby_2_7
|
195
|
+
- bundle_ruby_3_2
|
196
|
+
- tests_ruby_3_2_rails_7_0_postgres:
|
184
197
|
requires:
|
185
|
-
-
|
186
|
-
-
|
198
|
+
- bundle_ruby_3_2
|
199
|
+
- tests_ruby_2_7_rails_7_0_postgres:
|
187
200
|
requires:
|
188
|
-
-
|
189
|
-
-
|
201
|
+
- bundle_ruby_2_7
|
202
|
+
- tests_ruby_2_7_rails_7_0_mysql:
|
190
203
|
requires:
|
191
|
-
-
|
204
|
+
- bundle_ruby_2_7
|
data/.eslintrc
CHANGED
data/Gemfile
CHANGED
@@ -6,7 +6,7 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
|
|
6
6
|
actionmailer actionpack actionview activejob activemodel activerecord
|
7
7
|
activestorage activesupport railties
|
8
8
|
].each do |rails_gem|
|
9
|
-
gem rails_gem, ENV.fetch('RAILS_VERSION', '~>
|
9
|
+
gem rails_gem, ENV.fetch('RAILS_VERSION', '~> 7.0.0'), require: false
|
10
10
|
end
|
11
11
|
|
12
12
|
platforms :jruby do
|
@@ -49,16 +49,12 @@ group :test, :development do
|
|
49
49
|
gem 'rubocop-rspec', require: false
|
50
50
|
gem 'pry-byebug'
|
51
51
|
gem 'webdrivers', '~> 4.1'
|
52
|
-
|
52
|
+
# Puma 6.0 causes issues in specs due to conflict with capybara version
|
53
|
+
gem 'puma', '< 6.0'
|
53
54
|
gem 'ffaker'
|
54
55
|
end
|
55
56
|
|
56
|
-
|
57
|
-
gem 'github_fast_changelog'
|
58
|
-
gem 'solargraph'
|
59
|
-
end
|
60
|
-
|
61
|
-
spree_opts = { github: 'spree/spree', branch: ENV.fetch('SPREE_BRANCH', '4-4-stable') }
|
57
|
+
spree_opts = { github: 'spree/spree', branch: ENV.fetch('SPREE_BRANCH', 'main') }
|
62
58
|
gem 'spree_core', spree_opts
|
63
59
|
gem 'spree_api', spree_opts
|
64
60
|
|
data/README.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# Spree (Legacy) Frontend
|
2
2
|
|
3
|
-
This is the old Spree Storefront extracted from Spree < 4.3.
|
3
|
+
This is the old Spree Storefront extracted from Spree < 4.3 which was upgraded to Turbo/Hotwire.
|
4
|
+
|
5
|
+
## Developed by
|
6
|
+
|
7
|
+
[![Vendo](https://assets-global.website-files.com/6230c485f2c32ea1b0daa438/623372f40a8c54ca9aea34e8_vendo%202.svg)](https://getvendo.com?utm_source=spree_frontend_github)
|
8
|
+
|
9
|
+
> All-in-one platform for all your Marketplace and B2B eCommerce needs. [Start your 30-day free trial](https://e98esoirr8c.typeform.com/contactvendo?typeform-source=spree_sdk_github)
|
4
10
|
|
5
11
|
## Installation
|
6
12
|
|
@@ -10,13 +16,61 @@ Add
|
|
10
16
|
gem 'spree_frontend'
|
11
17
|
```
|
12
18
|
|
13
|
-
to your `Gemfile`.
|
19
|
+
to your `Gemfile`, making sure that the `spree_frontend` gem is before `spree_auth_devise`.
|
20
|
+
|
21
|
+
Make sure both `gem 'jsbundling-rails'` and `gem 'turbo-rails'` are added as well.
|
14
22
|
|
15
23
|
Run:
|
16
24
|
|
17
25
|
```bash
|
18
26
|
bundle install
|
27
|
+
bin/rails javascript:install:esbuild
|
28
|
+
bin/rails turbo:install
|
19
29
|
bin/rails g spree:frontend:install
|
30
|
+
yarn build
|
31
|
+
```
|
32
|
+
|
33
|
+
### Troubleshooting
|
34
|
+
|
35
|
+
#### Disabled 'Add to Cart' Button Issue
|
36
|
+
|
37
|
+
If you notice that the 'Add to Cart' button is disabled on product pages, try the following:
|
38
|
+
* run `yarn build` again in your main repo
|
39
|
+
* if that doesn't fix the issue, try running the following setup commands again:
|
40
|
+
```
|
41
|
+
bin/rails javascript:install:esbuild
|
42
|
+
bin/rails turbo:install
|
43
|
+
bin/rails g spree:frontend:install
|
44
|
+
yarn build
|
45
|
+
rake assets:clean assets:precompile
|
46
|
+
```
|
47
|
+
|
48
|
+
This issue may come up if you switch the source of your `spree_frontend` in your Gemfile, e.g. from github to a local path, etc.
|
49
|
+
|
50
|
+
#### Checkout without logging in results in 500 error
|
51
|
+
|
52
|
+
When you navigate to checkout without logging in first, you may get a a 500 error notifying you that "yourdomain.com redirected you too many times."
|
53
|
+
|
54
|
+
This error results from the routes defined in `spree_frontend` and `spree_auth_devise` not being built in the correct order. Make sure the `spree_frontend` gem is listed before `spree_auth_devise` in your main project's gemfile, then try again.
|
55
|
+
|
56
|
+
## Running Tests
|
57
|
+
|
58
|
+
In order to generate the dummy app required for running tests, you’ll need to have the following installed on your machine:
|
59
|
+
* node v16.13.1 (npm v8.1.2)
|
60
|
+
* yarn ≥ v1.22.15
|
61
|
+
* ruby v3.0.3
|
62
|
+
|
63
|
+
To run tests locally, first run `bundle exec rake test_app`, then `bundle exec rspec`.
|
64
|
+
|
65
|
+
### Troubleshooting
|
66
|
+
If you are running on a Mac with an M1 processor, you may run into the following error when running tests:
|
67
|
+
```
|
68
|
+
Webdrivers::NetworkError:
|
69
|
+
Net::HTTPServerException: 404 "Not Found"
|
70
|
+
```
|
71
|
+
If so, update your gemfile locally to get version 5.0 or higher for the web drivers gem:
|
72
|
+
```
|
73
|
+
gem 'webdrivers', '~> 5.0'
|
20
74
|
```
|
21
75
|
|
22
76
|
## Maintanence policy
|
Binary file
|
Binary file
|
Binary file
|
data/app/assets/images/logo.png
CHANGED
Binary file
|
data/app/assets/images/logo.svg
CHANGED
@@ -1 +1,10 @@
|
|
1
|
-
<svg
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1199.129" height="300.825" viewBox="0 0 1199.129 300.825">
|
2
|
+
<g transform="translate(-224.344 -239.125)" fill="currentColor">
|
3
|
+
<g transform="translate(224.344 239.125)">
|
4
|
+
<g>
|
5
|
+
<path d="M125.668,240.112h0a72.581,72.581,0,0,1-23.006-3.89,94.124,94.124,0,0,1-18.873-8.857,107.267,107.267,0,0,1-20.2-15.773h0a.038.038,0,0,1-.01-.008L67.7,205.44a.257.257,0,0,0,.031.015,129.888,129.888,0,0,0,18,6.538,159.717,159.717,0,0,0,18.66,4.242,140.957,140.957,0,0,0,22.752,1.911c18.939,0,36.223-4.183,51.365-12.433l4.6,6.144C165.469,230.606,146.145,240.112,125.668,240.112Zm49.205-52.481a15.174,15.174,0,0,1-10.359-3.971,12.848,12.848,0,0,1,0-19.168,15.5,15.5,0,0,1,20.719,0,12.848,12.848,0,0,1,0,19.168A15.167,15.167,0,0,1,174.873,187.631Zm-102.539,0c-8.377,0-15.2-6.081-15.2-13.555s6.818-13.555,15.2-13.555a16.057,16.057,0,0,1,10.74,3.971,12.551,12.551,0,0,1,0,19.168A16.06,16.06,0,0,1,72.334,187.631Zm5.723-45.9a32.085,32.085,0,0,1-10.328-1.7,31.065,31.065,0,0,1-8.91-4.729,29.019,29.019,0,0,1-6.748-7.224,27.241,27.241,0,0,1-3.848-9.182L30.924,18.424H0L.008,0h37.41A12.563,12.563,0,0,1,44.98,2.5a10.945,10.945,0,0,1,4.137,6.373l4.895,24.229H203.217a12.291,12.291,0,0,1,9.2,4,10.438,10.438,0,0,1,2.531,9.111l-14.965,72.605a27.356,27.356,0,0,1-3.859,9.228,28.967,28.967,0,0,1-6.777,7.248,31.211,31.211,0,0,1-8.98,4.738,32.738,32.738,0,0,1-10.459,1.7c-.2,0-.387,0-.588-.005H78.641C78.449,141.736,78.25,141.736,78.057,141.736ZM193.385,52.909h0l-135.6.019,10.869,61.653a6.213,6.213,0,0,0,2.342,3.641,7.124,7.124,0,0,0,4.291,1.419h.131l97.768-.019h.152a6.726,6.726,0,0,0,6.846-5.041L193.389,52.91Z" transform="translate(0 0)" />
|
6
|
+
</g>
|
7
|
+
</g>
|
8
|
+
<path d="M220.518,267.868H188.227V3.852h28.885l3.414,34.871.051.538h3.205l.17-.313a71.884,71.884,0,0,1,12.227-16.555A70.851,70.851,0,0,1,252.49,10.179a80,80,0,0,1,19.9-7.58A99.514,99.514,0,0,1,295.41,0c12.859,0,24.6,2.308,34.889,6.858a69.852,69.852,0,0,1,26.039,19.913c7.152,8.765,12.648,19.555,16.334,32.071,3.758,12.743,5.662,27.323,5.662,43.333,0,16.193-1.9,30.9-5.662,43.722-3.693,12.6-9.189,23.417-16.334,32.165A69.522,69.522,0,0,1,330.3,197.925c-10.266,4.522-22,6.815-34.895,6.815a101.836,101.836,0,0,1-23.617-2.656,79.464,79.464,0,0,1-20.025-7.667,67.849,67.849,0,0,1-27.812-28.62l-.168-.319h-3.27Zm65.65-241.347a76.039,76.039,0,0,0-26.777,4.591A59.7,59.7,0,0,0,238.65,44.06a57.23,57.23,0,0,0-13.391,20.02,68.977,68.977,0,0,0-4.742,25.782v25.018A68.52,68.52,0,0,0,225.26,140.6a56.735,56.735,0,0,0,13.391,19.894A59.585,59.585,0,0,0,259.4,173.3a76.919,76.919,0,0,0,26.77,4.535c17.721,0,32.619-5.164,43.084-14.933,10.484-9.782,16.025-23.727,16.025-40.327V82.163c0-16.625-5.539-30.635-16.018-40.514C318.768,31.752,303.867,26.521,286.168,26.521ZM813.123,207.434c-14.346,0-27.553-2.449-39.25-7.278a81.139,81.139,0,0,1-29.59-20.815,92.683,92.683,0,0,1-18.717-32.885c-4.332-12.969-6.531-27.608-6.531-43.509,0-15.868,2.2-30.426,6.525-43.271a90,90,0,0,1,18.674-32.347A80.172,80.172,0,0,1,773.711,7.041C785.316,2.369,798.449,0,812.74,0a104.883,104.883,0,0,1,36.965,6.245,76.843,76.843,0,0,1,27.906,17.877A78.153,78.153,0,0,1,895.27,52.385a108.659,108.659,0,0,1,6.178,37.477,171.369,171.369,0,0,1-1.086,20.188H752.1l0,12.146a65.8,65.8,0,0,0,4.406,24.36,53.083,53.083,0,0,0,12.516,18.792,55.624,55.624,0,0,0,19.518,12.077,73.161,73.161,0,0,0,25.357,4.259c13.848,0,26.477-3.546,36.518-10.254a49.172,49.172,0,0,0,20.127-27.085h31.914c-4.311,19.228-14.252,34.234-30.393,45.877a92.6,92.6,0,0,1-12.91,7.529,93.781,93.781,0,0,1-14.1,5.375,104.528,104.528,0,0,1-15.326,3.232A124.678,124.678,0,0,1,813.123,207.434ZM812.74,25.75a73.857,73.857,0,0,0-24.521,3.965,56.338,56.338,0,0,0-19.18,11.2A49.878,49.878,0,0,0,756.547,58.26,55.846,55.846,0,0,0,752.1,80.622V86.61H869.535l0-8.3a55.422,55.422,0,0,0-4.117-21.5A47.378,47.378,0,0,0,853.8,40.195a51.919,51.919,0,0,0-17.953-10.673A68.611,68.611,0,0,0,812.74,25.75ZM602.188,207.434c-14.346,0-27.553-2.449-39.25-7.278a81.053,81.053,0,0,1-29.59-20.815,92.683,92.683,0,0,1-18.717-32.885c-4.332-12.969-6.531-27.608-6.531-43.509,0-15.882,2.2-30.44,6.525-43.271A90,90,0,0,1,533.3,27.329,80.2,80.2,0,0,1,562.77,7.041C574.381,2.369,587.514,0,601.8,0A104.883,104.883,0,0,1,638.77,6.245a76.845,76.845,0,0,1,27.9,17.877,78.078,78.078,0,0,1,17.664,28.263,108.613,108.613,0,0,1,6.178,37.477,171.4,171.4,0,0,1-1.084,20.188H541.16l0,12.146a65.8,65.8,0,0,0,4.406,24.36,53,53,0,0,0,12.516,18.792,55.615,55.615,0,0,0,19.52,12.077,73.094,73.094,0,0,0,25.355,4.259c13.848,0,26.477-3.546,36.518-10.254A49.146,49.146,0,0,0,659.6,144.344h31.914c-4.311,19.228-14.252,34.234-30.393,45.877a91.839,91.839,0,0,1-27.012,12.9,104.621,104.621,0,0,1-15.326,3.232A124.678,124.678,0,0,1,602.188,207.434ZM601.8,25.75a73.849,73.849,0,0,0-24.521,3.965,56.338,56.338,0,0,0-19.18,11.2A49.755,49.755,0,0,0,545.611,58.26a55.846,55.846,0,0,0-4.449,22.362V86.61H658.6l0-8.3a55.377,55.377,0,0,0-4.117-21.5,47.378,47.378,0,0,0-11.619-16.612,51.906,51.906,0,0,0-17.953-10.673A68.619,68.619,0,0,0,601.8,25.75ZM81.393,207.434c-24.617,0-45.252-6.1-59.678-17.626A56.742,56.742,0,0,1,5.605,169.613,60.958,60.958,0,0,1,0,143.962H31.914c.158,11.487,4.887,21.176,13.678,28.021s21.18,10.47,35.8,10.47a73.968,73.968,0,0,0,19.047-2.274,42.731,42.731,0,0,0,14.363-6.646,29.5,29.5,0,0,0,9.076-10.736,32.54,32.54,0,0,0,3.146-14.432,30.161,30.161,0,0,0-1.7-10.379,23.257,23.257,0,0,0-5.111-8.218,28.879,28.879,0,0,0-8.469-5.976,49.488,49.488,0,0,0-11.77-3.727l-43.113-8.086a100.8,100.8,0,0,1-23.322-6.953A56.1,56.1,0,0,1,17,93.958,42.633,42.633,0,0,1,7.139,78.8,54.181,54.181,0,0,1,3.854,59.45,57.6,57.6,0,0,1,9.145,34.57,51.835,51.835,0,0,1,24.215,15.9C37.465,5.5,56.438,0,79.08,0A110.546,110.546,0,0,1,111.02,4.34a70.231,70.231,0,0,1,23.936,12.271c13.072,10.551,20.162,25.557,20.5,43.4H123.535c-1-23.5-15.959-35.416-44.455-35.416a70.987,70.987,0,0,0-18.3,2.18A39.769,39.769,0,0,0,47.3,33.035a27.234,27.234,0,0,0-8.334,9.922,29.573,29.573,0,0,0-2.83,13.029,28.154,28.154,0,0,0,3.4,14.106,23.2,23.2,0,0,0,9.619,9.133l.045.019c7.922,3.4,11.479,4.623,19.758,6.2l39.648,7.31A93.816,93.816,0,0,1,131.49,99.57a54.132,54.132,0,0,1,16.3,11.206,43.876,43.876,0,0,1,9.783,15.591,58.259,58.259,0,0,1,3.273,20.075,58.013,58.013,0,0,1-5.57,25.6A53.43,53.43,0,0,1,139.395,191.2C125.43,201.82,105.373,207.434,81.393,207.434Zm357.762-3.852H406.861V32.891a39.827,39.827,0,0,1,1.848-12.722,22.8,22.8,0,0,1,5.525-9.032A23.415,23.415,0,0,1,423.5,5.693a42.561,42.561,0,0,1,13.174-1.841h69.07V30.367H439.158Z" transform="translate(521.02 272.083)" />
|
9
|
+
</g>
|
10
|
+
</svg>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,23 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<path d="M70.287,208.737C60.149,208.737 49.575,204.919 38.207,197.286C33.568,194.171 32.332,187.884 35.447,183.245C38.563,178.607 44.849,177.371 49.49,180.485C67.208,192.383 77.219,189.517 87.633,181.039C91.967,177.511 98.341,178.163 101.869,182.497C105.396,186.832 104.744,193.206 100.409,196.733C90.579,204.736 80.662,208.737 70.287,208.737" style="fill:rgb(153,204,0);fill-rule:nonzero;"/>
|
1
|
+
<svg width="180" height="240" xmlns="http://www.w3.org/2000/svg" version="1.1" xml:space="preserve" clip-rule="evenodd">
|
2
|
+
<g>
|
3
|
+
<g fill="rgb(0,0,0)" opacity="0.5">
|
4
|
+
<path stroke="null"
|
5
|
+
d="m37.38608,79.18345l0,0a8.05821,8.05821 0 0 1 -2.55421,-0.43188a10.45,10.45 0 0 1 -2.09535,-0.98334a11.90918,11.90918 0 0 1 -2.24268,-1.75118l0,0a0.00422,0.00422 0 0 1 -0.00111,-0.00089l0.45753,-0.68213a0.02854,0.02854 0 0 0 0.00344,0.00167a14.42065,14.42065 0 0 0 1.99843,0.72587a17.73238,17.73238 0 0 0 2.0717,0.47096a15.64957,15.64957 0 0 0 2.52601,0.21216c2.10268,0 4.02162,-0.46441 5.70274,-1.38036l0.51071,0.68213c-1.95835,2.08158 -4.10377,3.13697 -6.3772,3.13697l-0.00002,0.00002zm5.46292,-5.82663a1.68467,1.68467 0 0 1 -1.15009,-0.44087a1.42643,1.42643 0 0 1 0,-2.1281a1.72087,1.72087 0 0 1 2.3003,0a1.42643,1.42643 0 0 1 0,2.1281a1.6839,1.6839 0 0 1 -1.15021,0.44087zm-11.38426,0c-0.93005,0 -1.68756,-0.67513 -1.68756,-1.50492s0.75696,-1.50492 1.68756,-1.50492a1.78271,1.78271 0 0 1 1.19239,0.44087a1.39346,1.39346 0 0 1 0,2.1281a1.78304,1.78304 0 0 1 -1.19239,0.44087zm0.63539,-5.09599a3.5622,3.5622 0 0 1 -1.14665,-0.18874a3.44895,3.44895 0 0 1 -0.98922,-0.52503a3.2218,3.2218 0 0 1 -0.74919,-0.80204a3.0244,3.0244 0 0 1 -0.42722,-1.01942l-1.9206,-11.15478l-3.43329,0l0.00089,-2.0455l4.1534,0a1.39479,1.39479 0 0 1 0.83956,0.27756a1.21515,1.21515 0 0 1 0.4593,0.70756l0.54346,2.68999l16.56529,0a1.36459,1.36459 0 0 1 1.02142,0.44409a1.15887,1.15887 0 0 1 0.281,1.01154l-1.66147,8.06088a3.03716,3.03716 0 0 1 -0.42844,1.02453a3.21602,3.21602 0 0 1 -0.75241,0.8047a3.46516,3.46516 0 0 1 -0.99699,0.52603a3.6347,3.6347 0 0 1 -1.1612,0.18874c-0.02221,0 -0.04296,0 -0.06528,-0.00056l-10.06752,0c-0.02132,0.001 -0.04341,0.001 -0.06484,0.001l0,-0.00056l0.00001,0.00001zm12.80414,-9.86134l0,0l-15.05482,0.00211l1.20671,6.84495a0.68979,0.68979 0 0 0 0.26002,0.40424a0.79094,0.79094 0 0 0 0.4764,0.15754l0.01455,0l10.85456,-0.00211l0.01688,0a0.74674,0.74674 0 0 0 0.76007,-0.55967l1.46607,-6.84695l-0.00044,-0.00011z"
|
6
|
+
id="svg_4"/>
|
7
|
+
<path stroke="null"
|
8
|
+
d="m80.85475,85.92415l-3.58506,0l0,-29.31204l3.20692,0l0.37903,3.87151l0.00566,0.05973l0.35583,0l0.01888,-0.03475a7.98083,7.98083 0 0 1 1.35748,-1.838a7.86614,7.86614 0 0 1 1.8109,-1.35604a8.88189,8.88189 0 0 1 2.20937,-0.84156a11.04841,11.04841 0 0 1 2.55577,-0.28855c1.42765,0 2.73118,0.25625 3.87351,0.7614a7.75523,7.75523 0 0 1 2.89094,2.21081c0.79405,0.97312 1.40423,2.17107 1.81346,3.56065c0.41723,1.41478 0.62862,3.0335 0.62862,4.81099c0,1.79781 -0.21094,3.43063 -0.62862,4.85418c-0.41001,1.3989 -1.0202,2.59984 -1.81346,3.57107a7.71859,7.71859 0 0 1 -2.89083,2.20526c-1.13977,0.50205 -2.44252,0.75663 -3.87417,0.75663a11.30621,11.30621 0 0 1 -2.62205,-0.29488a8.82239,8.82239 0 0 1 -2.22325,-0.85122a7.53285,7.53285 0 0 1 -3.08779,-3.1775l-0.01865,-0.03542l-0.36304,0l0.00056,11.36772l-0.00001,0zm7.28871,-26.79524a8.44213,8.44213 0 0 0 -2.97288,0.50971a6.62812,6.62812 0 0 0 -2.30274,1.43753a6.35389,6.35389 0 0 0 -1.48672,2.22269a7.65808,7.65808 0 0 0 -0.52647,2.86242l0,2.77759a7.60735,7.60735 0 0 0 0.52658,2.85553a6.29893,6.29893 0 0 0 1.48672,2.2087a6.61535,6.61535 0 0 0 2.30363,1.42177a8.53984,8.53984 0 0 0 2.9721,0.50349c1.96745,0 3.62148,-0.57333 4.78335,-1.65791c1.16397,-1.08604 1.77916,-2.63426 1.77916,-4.47726l0,-4.48669c0,-1.84577 -0.61496,-3.40121 -1.77838,-4.49801c-1.16497,-1.0988 -2.81933,-1.67957 -4.78435,-1.67957l0,0.00002zm58.5045,20.08563c-1.59274,0 -3.05904,-0.27189 -4.35768,-0.80803a9.00836,9.00836 0 0 1 -3.28519,-2.31096a10.29001,10.29001 0 0 1 -2.07803,-3.65101c-0.48096,-1.43986 -0.7251,-3.06514 -0.7251,-4.83053c0,-1.76172 0.24425,-3.37801 0.72443,-4.8041a9.99214,9.99214 0 0 1 2.07326,-3.59128a8.90099,8.90099 0 0 1 3.27264,-2.25245c1.28843,-0.5187 2.7465,-0.78172 4.33314,-0.78172a11.6445,11.6445 0 0 1 4.10399,0.69334a8.5314,8.5314 0 0 1 3.09823,1.98477a8.67684,8.67684 0 0 1 1.96056,3.13786a12.06373,12.06373 0 0 1 0.6859,4.16084a19.02602,19.02602 0 0 1 -0.12057,2.24135l-16.46059,0l0,1.34849a7.30536,7.30536 0 0 0 0.48917,2.70454a5.89347,5.89347 0 0 0 1.38957,2.08636a6.17558,6.17558 0 0 0 2.16696,1.34083a8.1226,8.1226 0 0 0 2.81523,0.47285c1.53746,0 2.93958,-0.39369 4.05436,-1.13844a5.45926,5.45926 0 0 0 2.23458,-3.00708l3.54321,0c-0.47863,2.13476 -1.58231,3.80078 -3.37434,5.09344a10.2808,10.2808 0 0 1 -1.43331,0.8359a10.41191,10.41191 0 0 1 -1.56544,0.59675a11.60509,11.60509 0 0 1 -1.70155,0.35883a13.84222,13.84222 0 0 1 -1.84344,0.11946l0.00001,-0.00001zm-0.04252,-20.17123a8.19988,8.19988 0 0 0 -2.72241,0.44021a6.25485,6.25485 0 0 0 -2.12943,1.24347a5.53764,5.53764 0 0 0 -1.38691,1.92571a6.20023,6.20023 0 0 0 -0.49373,2.48272l0,0.66481l13.03807,0l0,-0.9215a6.15316,6.15316 0 0 0 -0.45708,-2.38701a5.26008,5.26008 0 0 0 -1.28987,-1.84466a5.76424,5.76424 0 0 0 -1.99321,-1.18496a7.61745,7.61745 0 0 0 -2.56543,-0.41878l0,-0.00001zm-23.37626,20.17123c-1.59274,0 -3.05904,-0.27189 -4.35768,-0.80803a8.99881,8.99881 0 0 1 -3.28519,-2.31096a10.29001,10.29001 0 0 1 -2.07803,-3.65101c-0.48096,-1.43986 -0.7251,-3.06514 -0.7251,-4.83053c0,-1.76328 0.24425,-3.37956 0.72443,-4.8041a9.99214,9.99214 0 0 1 2.07337,-3.59128a8.9041,8.9041 0 0 1 3.27187,-2.25245c1.28909,-0.5187 2.74717,-0.78172 4.33326,-0.78172a11.6445,11.6445 0 0 1 4.10455,0.69334a8.53162,8.53162 0 0 1 3.09757,1.98477a8.66851,8.66851 0 0 1 1.96112,3.13786a12.05862,12.05862 0 0 1 0.6859,4.16084a19.02946,19.02946 0 0 1 -0.12035,2.24135l-16.46126,0l0,1.34849a7.30536,7.30536 0 0 0 0.48917,2.70454a5.88425,5.88425 0 0 0 1.38957,2.08636a6.17458,6.17458 0 0 0 2.16719,1.34083a8.11517,8.11517 0 0 0 2.815,0.47285c1.53746,0 2.93958,-0.39369 4.05436,-1.13844a5.45637,5.45637 0 0 0 2.23435,-3.00719l3.54321,0c-0.47863,2.13476 -1.58231,3.80078 -3.37434,5.09344a10.19631,10.19631 0 0 1 -2.99897,1.4322a11.61541,11.61541 0 0 1 -1.70155,0.35883a13.84222,13.84222 0 0 1 -1.84244,0.12001l0.00001,0zm-0.04307,-20.17123a8.19899,8.19899 0 0 0 -2.72241,0.44021a6.25485,6.25485 0 0 0 -2.12943,1.24347a5.52398,5.52398 0 0 0 -1.38646,1.92571a6.20023,6.20023 0 0 0 -0.49395,2.48272l0,0.66481l13.0384,0l0,-0.9215a6.14816,6.14816 0 0 0 -0.45708,-2.38701a5.26008,5.26008 0 0 0 -1.28998,-1.84433a5.7628,5.7628 0 0 0 -1.99321,-1.18496a7.61834,7.61834 0 0 0 -2.56587,-0.41912l-0.00001,-0.00001zm-57.77752,20.17123c-2.73307,0 -5.02404,-0.67724 -6.62568,-1.9569a6.29971,6.29971 0 0 1 -1.7886,-2.24213a6.76779,6.76779 0 0 1 -0.62229,-2.84787l3.54321,0c0.01754,1.27533 0.54257,2.35103 1.51858,3.11099s2.35148,1.16242 3.97465,1.16242a8.2122,8.2122 0 0 0 2.11466,-0.25247a4.74415,4.74415 0 0 0 1.59463,-0.73786a3.2752,3.2752 0 0 0 1.00765,-1.19195a3.61271,3.61271 0 0 0 0.34928,-1.60229a3.34858,3.34858 0 0 0 -0.18874,-1.15232a2.58208,2.58208 0 0 0 -0.56745,-0.91239a3.20625,3.20625 0 0 0 -0.94026,-0.66347a5.49434,5.49434 0 0 0 -1.30675,-0.41379l-4.78657,-0.89773a11.19119,11.19119 0 0 1 -2.58929,-0.77195a6.22843,6.22843 0 0 1 -1.83622,-1.22881a4.73327,4.73327 0 0 1 -1.09481,-1.6829a6.01538,6.01538 0 0 1 -0.36471,-2.14831a6.39497,6.39497 0 0 1 0.58742,-2.76227a5.75491,5.75491 0 0 1 1.67313,-2.07281c1.47107,-1.15465 3.57751,-1.76528 6.09132,-1.76528a12.27323,12.27323 0 0 1 3.5461,0.48185a7.7973,7.7973 0 0 1 2.65746,1.36237c1.4513,1.17141 2.23846,2.83743 2.27598,4.81843l-3.54399,0c-0.11103,-2.60906 -1.77183,-3.93202 -4.93556,-3.93202a7.88124,7.88124 0 0 0 -2.03173,0.24203a4.4153,4.4153 0 0 0 -1.4966,0.69501a3.02362,3.02362 0 0 0 -0.92527,1.10158a3.2833,3.2833 0 0 0 -0.3142,1.44653a3.12576,3.12576 0 0 0 0.37748,1.5661a2.57575,2.57575 0 0 0 1.06794,1.01398l0.005,0.00211c0.87953,0.37748 1.27444,0.51326 2.1936,0.68835l4.40187,0.81158a10.4158,10.4158 0 0 1 2.54067,0.75674a6.00994,6.00994 0 0 1 1.80968,1.24413a4.87128,4.87128 0 0 1 1.08615,1.73097a6.46813,6.46813 0 0 1 0.36338,2.2288a6.44082,6.44082 0 0 1 -0.6184,2.84221a5.932,5.932 0 0 1 -1.76317,2.12699c-1.55045,1.17908 -3.77725,1.80236 -6.4396,1.80236zm39.72006,-0.42766l-3.5854,0l0,-18.95075a4.42174,4.42174 0 0 1 0.20517,-1.41245a2.53134,2.53134 0 0 1 0.61341,-1.00277a2.59962,2.59962 0 0 1 1.02875,-0.60441a4.72528,4.72528 0 0 1 1.46263,-0.20439l7.66841,0l0,2.9438l-7.39263,0l-0.00033,19.23097l-0.00001,0z"
|
9
|
+
id="svg_5"/>
|
11
10
|
</g>
|
12
|
-
<g transform="matrix(
|
13
|
-
|
14
|
-
|
15
|
-
</g>
|
16
|
-
<g transform="matrix(9.26626,0,0,9.26626,16.011,72.835)">
|
17
|
-
<path d="M1.5,2C0.677,2 -0,2.677 0,3.5L0,12.5C0,13.323 0.677,14 1.5,14L14.5,14C15.323,14 16,13.323 16,12.5L16,3.5C16,2.677 15.323,2 14.5,2L1.5,2ZM14.5,3C14.774,3 15,3.226 15,3.5L15,9.5L11.225,7.553C11.033,7.457 10.8,7.495 10.648,7.646L6.938,11.356L4.278,9.584C4.081,9.453 3.816,9.479 3.648,9.646L1.002,12L1.002,12.54C1.001,12.527 1,12.513 1,12.5L1,3.5C1,3.226 1.226,3 1.5,3L14.5,3Z" style="fill:rgb(125,125,125);fill-rule:nonzero;"/>
|
18
|
-
</g>
|
19
|
-
</g>
|
20
|
-
<g transform="matrix(1.89682,0,0,1.89682,-1.5642,-167.039)">
|
21
|
-
<text x="18.181px" y="200.157px" style="font-family:'Arial-BoldMT', 'Arial', sans-serif;font-weight:700;font-size:12px;fill:rgb(0,102,204);">NO IMAGE</text>
|
11
|
+
<g transform="matrix(1.89682 0 0 1.89682 -1.5642 -167.039)" opacity="0.5">
|
12
|
+
<text x="23.43384" y="165.81385" font-family="'Arial', sans-serif" font-weight="400" font-size="10" fill="rgb(0,0,0)">NO IMAGE</text>
|
13
|
+
<text x="21.55265" y="180.81385" font-family="'Arial', sans-serif" font-weight="400" font-size="10" fill="rgb(0,0,0)">AVAILABLE</text>
|
22
14
|
</g>
|
15
|
+
</g>
|
23
16
|
</svg>
|
Binary file
|
Binary file
|
@@ -1,4 +1,4 @@
|
|
1
|
-
//= require spree
|
1
|
+
//= require spree/frontend/main
|
2
2
|
|
3
3
|
var SpreeAPI = {
|
4
4
|
oauthToken: null, // user Bearer token to authorize operations for the given user
|
@@ -9,9 +9,9 @@ SpreeAPI.Storefront = {}
|
|
9
9
|
SpreeAPI.Platform = {}
|
10
10
|
|
11
11
|
// API routes
|
12
|
-
Spree.routes.api_v2_storefront_cart_create = Spree.
|
13
|
-
Spree.routes.api_v2_storefront_cart_add_item = Spree.
|
14
|
-
Spree.routes.api_v2_storefront_cart_apply_coupon_code = Spree.
|
12
|
+
Spree.routes.api_v2_storefront_cart_create = Spree.localizedPathFor('api/v2/storefront/cart')
|
13
|
+
Spree.routes.api_v2_storefront_cart_add_item = Spree.localizedPathFor('api/v2/storefront/cart/add_item')
|
14
|
+
Spree.routes.api_v2_storefront_cart_apply_coupon_code = Spree.localizedPathFor('api/v2/storefront/cart/apply_coupon_code')
|
15
15
|
|
16
16
|
// helpers
|
17
17
|
SpreeAPI.handle500error = function () {
|
@@ -69,11 +69,11 @@ Spree.ready(function($) {
|
|
69
69
|
var stateSpanRequired = statePara.find('abbr')
|
70
70
|
|
71
71
|
if (states.length > 0) {
|
72
|
-
selected =
|
72
|
+
selected = stateSelect.val()
|
73
73
|
stateSelect.html('')
|
74
74
|
$.each(states, function(idx, state) {
|
75
|
-
var opt = $(document.createElement('option')).attr('value', state.id).html(state.name)
|
76
|
-
if (selected.toString(
|
75
|
+
var opt = $(document.createElement('option')).attr('value', state.id.toString()).html(state.name)
|
76
|
+
if (selected && selected.toString() === state.id.toString()) {
|
77
77
|
opt.prop('selected', true)
|
78
78
|
}
|
79
79
|
stateSelect.append(opt)
|
@@ -1,12 +1,11 @@
|
|
1
|
-
document.addEventListener('
|
2
|
-
// this condition checks if this is the first initial load of
|
3
|
-
if (!event.
|
1
|
+
document.addEventListener('turbo:load', function(event) {
|
2
|
+
// this condition checks if this is the first initial load of turbo application
|
3
|
+
if (!event.detail.timing.visitStart) {
|
4
4
|
var currencySelect = document.querySelectorAll('select[name=switch_to_currency]')
|
5
5
|
|
6
6
|
if (currencySelect.length) {
|
7
7
|
currencySelect.forEach(function (element) {
|
8
8
|
element.addEventListener('change', function () {
|
9
|
-
Spree.showProgressBar()
|
10
9
|
var newCurrency = this.value
|
11
10
|
|
12
11
|
// we need to make AJAX call here to the backend to set currency in session
|
@@ -28,16 +27,16 @@ document.addEventListener('turbolinks:load', function(event) {
|
|
28
27
|
|
29
28
|
// fix back button issue with different currency set
|
30
29
|
// invalidate page if cached page has different currency then the current one
|
31
|
-
document.addEventListener('
|
30
|
+
document.addEventListener('turbo:load', function(event) {
|
32
31
|
if (typeof (SPREE_DEFAULT_CURRENCY) !== 'undefined' && typeof (SPREE_CURRENCY) !== 'undefined') {
|
33
32
|
if (SPREE_CURRENCY === SPREE_DEFAULT_CURRENCY) {
|
34
33
|
var regexAnyCurrency = new RegExp('currency=')
|
35
|
-
if (event.
|
34
|
+
if (event.detail.url.match(regexAnyCurrency) && !event.detail.url.match(SPREE_CURRENCY)) {
|
36
35
|
Spree.setCurrency(SPREE_CURRENCY)
|
37
36
|
}
|
38
37
|
} else {
|
39
38
|
var regex = new RegExp('currency=' + SPREE_CURRENCY)
|
40
|
-
if (!event.
|
39
|
+
if (!event.detail.url.match(regex)) {
|
41
40
|
Spree.setCurrency(SPREE_CURRENCY)
|
42
41
|
}
|
43
42
|
}
|
@@ -1,11 +1,10 @@
|
|
1
|
-
document.addEventListener('
|
1
|
+
document.addEventListener('turbo:load', () => {
|
2
2
|
const localeSelect = document.querySelectorAll('select[name=switch_to_locale]')
|
3
3
|
|
4
4
|
if (localeSelect.length) {
|
5
5
|
localeSelect.forEach((element) => {
|
6
6
|
element.addEventListener('change', () => {
|
7
7
|
Spree.clearCache()
|
8
|
-
Spree.showProgressBar()
|
9
8
|
element.form.submit()
|
10
9
|
})
|
11
10
|
})
|
@@ -2,7 +2,7 @@
|
|
2
2
|
function Spree () {}
|
3
3
|
|
4
4
|
Spree.ready = function (callback) {
|
5
|
-
return jQuery(document).on('page:load
|
5
|
+
return jQuery(document).on('page:load turbo:load', function () {
|
6
6
|
return callback(jQuery)
|
7
7
|
})
|
8
8
|
}
|
@@ -32,7 +32,7 @@ Spree.localizedPathFor = function(path) {
|
|
32
32
|
if (pathName.match(/api\/v/)) {
|
33
33
|
params.set('locale', SPREE_LOCALE)
|
34
34
|
} else {
|
35
|
-
pathName = (this.mountedAt()) + SPREE_LOCALE + '/' +
|
35
|
+
pathName = (this.mountedAt()) + SPREE_LOCALE + '/' + pathName
|
36
36
|
}
|
37
37
|
return fullUrl.origin + pathName + '?' + params.toString()
|
38
38
|
}
|
@@ -68,11 +68,11 @@ Spree.ajax = function (urlOrSettings, settings) {
|
|
68
68
|
}
|
69
69
|
|
70
70
|
Spree.routes = {
|
71
|
-
states_search: Spree.
|
71
|
+
states_search: Spree.localizedPathFor('api/v1/states'),
|
72
72
|
apply_coupon_code: function (orderId) {
|
73
|
-
return Spree.
|
73
|
+
return Spree.localizedPathFor('api/v1/orders/' + orderId + '/apply_coupon_code')
|
74
74
|
},
|
75
|
-
cart: Spree.
|
75
|
+
cart: Spree.localizedPathFor('cart')
|
76
76
|
}
|
77
77
|
|
78
78
|
Spree.url_params = {}
|
@@ -15,8 +15,8 @@
|
|
15
15
|
|
16
16
|
// Invalidate the page when the next page is different from the current page
|
17
17
|
// Persist scroll information across pages
|
18
|
-
document.addEventListener('
|
19
|
-
if (event.
|
18
|
+
document.addEventListener('turbo:before-visit', function (event) {
|
19
|
+
if (event.detail.url !== location.href) {
|
20
20
|
sessionStorage.setItem(PAGE_INVALIDATED, 'true')
|
21
21
|
}
|
22
22
|
sessionStorage.setItem(SCROLL_POSITION, JSON.stringify(scrollData()))
|
@@ -28,7 +28,7 @@
|
|
28
28
|
// invalidation,
|
29
29
|
// 3. scroll to the persisted position if there, or to the top otherwise
|
30
30
|
// 4. Remove the persisted information
|
31
|
-
addEventListener('
|
31
|
+
addEventListener('turbo:load', function (event) {
|
32
32
|
var scrollPosition = JSON.parse(sessionStorage.getItem(SCROLL_POSITION))
|
33
33
|
|
34
34
|
if (shouldScroll(scrollPosition)) {
|