spree_frontend 4.1.15 → 4.2.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/arrow-down.svg +12 -0
- data/app/assets/images/edit.svg +1 -1
- data/app/assets/images/flags/4x3/ad.svg +150 -0
- data/app/assets/images/flags/4x3/ae.svg +6 -0
- data/app/assets/images/flags/4x3/af.svg +81 -0
- data/app/assets/images/flags/4x3/ag.svg +14 -0
- data/app/assets/images/flags/4x3/ai.svg +763 -0
- data/app/assets/images/flags/4x3/al.svg +5 -0
- data/app/assets/images/flags/4x3/am.svg +5 -0
- data/app/assets/images/flags/4x3/ao.svg +13 -0
- data/app/assets/images/flags/4x3/aq.svg +5 -0
- data/app/assets/images/flags/4x3/ar.svg +31 -0
- data/app/assets/images/flags/4x3/as.svg +33 -0
- data/app/assets/images/flags/4x3/at.svg +6 -0
- data/app/assets/images/flags/4x3/au.svg +9 -0
- data/app/assets/images/flags/4x3/aw.svg +186 -0
- data/app/assets/images/flags/4x3/ax.svg +18 -0
- data/app/assets/images/flags/4x3/az.svg +8 -0
- data/app/assets/images/flags/4x3/ba.svg +12 -0
- data/app/assets/images/flags/4x3/bb.svg +6 -0
- data/app/assets/images/flags/4x3/bd.svg +4 -0
- data/app/assets/images/flags/4x3/be.svg +7 -0
- data/app/assets/images/flags/4x3/bf.svg +7 -0
- data/app/assets/images/flags/4x3/bg.svg +7 -0
- data/app/assets/images/flags/4x3/bh.svg +9 -0
- data/app/assets/images/flags/4x3/bi.svg +15 -0
- data/app/assets/images/flags/4x3/bj.svg +14 -0
- data/app/assets/images/flags/4x3/bl.svg +7 -0
- data/app/assets/images/flags/4x3/bm.svg +98 -0
- data/app/assets/images/flags/4x3/bn.svg +36 -0
- data/app/assets/images/flags/4x3/bo.svg +676 -0
- data/app/assets/images/flags/4x3/bq.svg +5 -0
- data/app/assets/images/flags/4x3/br.svg +45 -0
- data/app/assets/images/flags/4x3/bs.svg +13 -0
- data/app/assets/images/flags/4x3/bt.svg +89 -0
- data/app/assets/images/flags/4x3/bv.svg +13 -0
- data/app/assets/images/flags/4x3/bw.svg +7 -0
- data/app/assets/images/flags/4x3/by.svg +20 -0
- data/app/assets/images/flags/4x3/bz.svg +145 -0
- data/app/assets/images/flags/4x3/ca.svg +4 -0
- data/app/assets/images/flags/4x3/cc.svg +19 -0
- data/app/assets/images/flags/4x3/cd.svg +5 -0
- data/app/assets/images/flags/4x3/cf.svg +15 -0
- data/app/assets/images/flags/4x3/cg.svg +12 -0
- data/app/assets/images/flags/4x3/ch.svg +9 -0
- data/app/assets/images/flags/4x3/ci.svg +7 -0
- data/app/assets/images/flags/4x3/ck.svg +9 -0
- data/app/assets/images/flags/4x3/cl.svg +13 -0
- data/app/assets/images/flags/4x3/cm.svg +15 -0
- data/app/assets/images/flags/4x3/cn.svg +11 -0
- data/app/assets/images/flags/4x3/co.svg +7 -0
- data/app/assets/images/flags/4x3/cr.svg +7 -0
- data/app/assets/images/flags/4x3/cu.svg +13 -0
- data/app/assets/images/flags/4x3/cv.svg +13 -0
- data/app/assets/images/flags/4x3/cw.svg +14 -0
- data/app/assets/images/flags/4x3/cx.svg +15 -0
- data/app/assets/images/flags/4x3/cy.svg +6 -0
- data/app/assets/images/flags/4x3/cz.svg +5 -0
- data/app/assets/images/flags/4x3/de.svg +5 -0
- data/app/assets/images/flags/4x3/dj.svg +13 -0
- data/app/assets/images/flags/4x3/dk.svg +5 -0
- data/app/assets/images/flags/4x3/dm.svg +152 -0
- data/app/assets/images/flags/4x3/do.svg +6745 -0
- data/app/assets/images/flags/4x3/dz.svg +5 -0
- data/app/assets/images/flags/4x3/ec.svg +138 -0
- data/app/assets/images/flags/4x3/ee.svg +7 -0
- data/app/assets/images/flags/4x3/eg.svg +38 -0
- data/app/assets/images/flags/4x3/eh.svg +15 -0
- data/app/assets/images/flags/4x3/er.svg +8 -0
- data/app/assets/images/flags/4x3/es-ca.svg +4 -0
- data/app/assets/images/flags/4x3/es.svg +544 -0
- data/app/assets/images/flags/4x3/et.svg +14 -0
- data/app/assets/images/flags/4x3/eu.svg +28 -0
- data/app/assets/images/flags/4x3/fi.svg +5 -0
- data/app/assets/images/flags/4x3/fj.svg +122 -0
- data/app/assets/images/flags/4x3/fk.svg +90 -0
- data/app/assets/images/flags/4x3/fm.svg +11 -0
- data/app/assets/images/flags/4x3/fo.svg +12 -0
- data/app/assets/images/flags/4x3/fr.svg +7 -0
- data/app/assets/images/flags/4x3/ga.svg +7 -0
- data/app/assets/images/flags/4x3/gb-eng.svg +5 -0
- data/app/assets/images/flags/4x3/gb-nir.svg +132 -0
- data/app/assets/images/flags/4x3/gb-sct.svg +4 -0
- data/app/assets/images/flags/4x3/gb-wls.svg +9 -0
- data/app/assets/images/flags/4x3/gb.svg +7 -0
- data/app/assets/images/flags/4x3/gd.svg +27 -0
- data/app/assets/images/flags/4x3/ge.svg +6 -0
- data/app/assets/images/flags/4x3/gf.svg +7 -0
- data/app/assets/images/flags/4x3/gg.svg +9 -0
- data/app/assets/images/flags/4x3/gh.svg +6 -0
- data/app/assets/images/flags/4x3/gi.svg +32 -0
- data/app/assets/images/flags/4x3/gl.svg +4 -0
- data/app/assets/images/flags/4x3/gm.svg +14 -0
- data/app/assets/images/flags/4x3/gn.svg +7 -0
- data/app/assets/images/flags/4x3/gp.svg +7 -0
- data/app/assets/images/flags/4x3/gq.svg +23 -0
- data/app/assets/images/flags/4x3/gr.svg +16 -0
- data/app/assets/images/flags/4x3/gs.svg +201 -0
- data/app/assets/images/flags/4x3/gt.svg +204 -0
- data/app/assets/images/flags/4x3/gu.svg +39 -0
- data/app/assets/images/flags/4x3/gw.svg +13 -0
- data/app/assets/images/flags/4x3/gy.svg +9 -0
- data/app/assets/images/flags/4x3/hk.svg +30 -0
- data/app/assets/images/flags/4x3/hm.svg +9 -0
- data/app/assets/images/flags/4x3/hn.svg +18 -0
- data/app/assets/images/flags/4x3/hr.svg +58 -0
- data/app/assets/images/flags/4x3/ht.svg +116 -0
- data/app/assets/images/flags/4x3/hu.svg +7 -0
- data/app/assets/images/flags/4x3/id.svg +6 -0
- data/app/assets/images/flags/4x3/ie.svg +7 -0
- data/app/assets/images/flags/4x3/il.svg +14 -0
- data/app/assets/images/flags/4x3/im.svg +36 -0
- data/app/assets/images/flags/4x3/in.svg +25 -0
- data/app/assets/images/flags/4x3/io.svg +138 -0
- data/app/assets/images/flags/4x3/iq.svg +10 -0
- data/app/assets/images/flags/4x3/ir.svg +219 -0
- data/app/assets/images/flags/4x3/is.svg +12 -0
- data/app/assets/images/flags/4x3/it.svg +7 -0
- data/app/assets/images/flags/4x3/je.svg +29 -0
- data/app/assets/images/flags/4x3/jm.svg +8 -0
- data/app/assets/images/flags/4x3/jo.svg +16 -0
- data/app/assets/images/flags/4x3/jp.svg +11 -0
- data/app/assets/images/flags/4x3/ke.svg +23 -0
- data/app/assets/images/flags/4x3/kg.svg +15 -0
- data/app/assets/images/flags/4x3/kh.svg +61 -0
- data/app/assets/images/flags/4x3/ki.svg +36 -0
- data/app/assets/images/flags/4x3/km.svg +16 -0
- data/app/assets/images/flags/4x3/kn.svg +14 -0
- data/app/assets/images/flags/4x3/kp.svg +15 -0
- data/app/assets/images/flags/4x3/kr.svg +24 -0
- data/app/assets/images/flags/4x3/kw.svg +13 -0
- data/app/assets/images/flags/4x3/ky.svg +63 -0
- data/app/assets/images/flags/4x3/kz.svg +23 -0
- data/app/assets/images/flags/4x3/la.svg +12 -0
- data/app/assets/images/flags/4x3/lb.svg +15 -0
- data/app/assets/images/flags/4x3/lc.svg +8 -0
- data/app/assets/images/flags/4x3/li.svg +43 -0
- data/app/assets/images/flags/4x3/lk.svg +22 -0
- data/app/assets/images/flags/4x3/lr.svg +14 -0
- data/app/assets/images/flags/4x3/ls.svg +8 -0
- data/app/assets/images/flags/4x3/lt.svg +7 -0
- data/app/assets/images/flags/4x3/lu.svg +5 -0
- data/app/assets/images/flags/4x3/lv.svg +6 -0
- data/app/assets/images/flags/4x3/ly.svg +13 -0
- data/app/assets/images/flags/4x3/ma.svg +4 -0
- data/app/assets/images/flags/4x3/mc.svg +6 -0
- data/app/assets/images/flags/4x3/md.svg +70 -0
- data/app/assets/images/flags/4x3/me.svg +116 -0
- data/app/assets/images/flags/4x3/mf.svg +7 -0
- data/app/assets/images/flags/4x3/mg.svg +7 -0
- data/app/assets/images/flags/4x3/mh.svg +7 -0
- data/app/assets/images/flags/4x3/mk.svg +5 -0
- data/app/assets/images/flags/4x3/ml.svg +7 -0
- data/app/assets/images/flags/4x3/mm.svg +16 -0
- data/app/assets/images/flags/4x3/mn.svg +13 -0
- data/app/assets/images/flags/4x3/mo.svg +9 -0
- data/app/assets/images/flags/4x3/mp.svg +86 -0
- data/app/assets/images/flags/4x3/mq.svg +7 -0
- data/app/assets/images/flags/4x3/mr.svg +6 -0
- data/app/assets/images/flags/4x3/ms.svg +78 -0
- data/app/assets/images/flags/4x3/mt.svg +49 -0
- data/app/assets/images/flags/4x3/mu.svg +8 -0
- data/app/assets/images/flags/4x3/mv.svg +6 -0
- data/app/assets/images/flags/4x3/mw.svg +10 -0
- data/app/assets/images/flags/4x3/mx.svg +382 -0
- data/app/assets/images/flags/4x3/my.svg +15 -0
- data/app/assets/images/flags/4x3/mz.svg +21 -0
- data/app/assets/images/flags/4x3/na.svg +16 -0
- data/app/assets/images/flags/4x3/nc.svg +14 -0
- data/app/assets/images/flags/4x3/ne.svg +6 -0
- data/app/assets/images/flags/4x3/nf.svg +9 -0
- data/app/assets/images/flags/4x3/ng.svg +6 -0
- data/app/assets/images/flags/4x3/ni.svg +129 -0
- data/app/assets/images/flags/4x3/nl.svg +5 -0
- data/app/assets/images/flags/4x3/no.svg +7 -0
- data/app/assets/images/flags/4x3/np.svg +14 -0
- data/app/assets/images/flags/4x3/nr.svg +12 -0
- data/app/assets/images/flags/4x3/nu.svg +26 -0
- data/app/assets/images/flags/4x3/nz.svg +41 -0
- data/app/assets/images/flags/4x3/om.svg +115 -0
- data/app/assets/images/flags/4x3/pa.svg +14 -0
- data/app/assets/images/flags/4x3/pe.svg +244 -0
- data/app/assets/images/flags/4x3/pf.svg +19 -0
- data/app/assets/images/flags/4x3/pg.svg +9 -0
- data/app/assets/images/flags/4x3/ph.svg +9 -0
- data/app/assets/images/flags/4x3/pk.svg +15 -0
- data/app/assets/images/flags/4x3/pl.svg +6 -0
- data/app/assets/images/flags/4x3/pm.svg +7 -0
- data/app/assets/images/flags/4x3/pn.svg +62 -0
- data/app/assets/images/flags/4x3/pr.svg +13 -0
- data/app/assets/images/flags/4x3/ps.svg +15 -0
- data/app/assets/images/flags/4x3/pt.svg +57 -0
- data/app/assets/images/flags/4x3/pw.svg +11 -0
- data/app/assets/images/flags/4x3/py.svg +157 -0
- data/app/assets/images/flags/4x3/qa.svg +4 -0
- data/app/assets/images/flags/4x3/re.svg +7 -0
- data/app/assets/images/flags/4x3/ro.svg +7 -0
- data/app/assets/images/flags/4x3/rs.svg +292 -0
- data/app/assets/images/flags/4x3/ru.svg +7 -0
- data/app/assets/images/flags/4x3/rw.svg +13 -0
- data/app/assets/images/flags/4x3/sa.svg +26 -0
- data/app/assets/images/flags/4x3/sb.svg +13 -0
- data/app/assets/images/flags/4x3/sc.svg +14 -0
- data/app/assets/images/flags/4x3/sd.svg +13 -0
- data/app/assets/images/flags/4x3/se.svg +5 -0
- data/app/assets/images/flags/4x3/sg.svg +13 -0
- data/app/assets/images/flags/4x3/sh.svg +74 -0
- data/app/assets/images/flags/4x3/si.svg +18 -0
- data/app/assets/images/flags/4x3/sj.svg +7 -0
- data/app/assets/images/flags/4x3/sk.svg +9 -0
- data/app/assets/images/flags/4x3/sl.svg +7 -0
- data/app/assets/images/flags/4x3/sm.svg +91 -0
- data/app/assets/images/flags/4x3/sn.svg +8 -0
- data/app/assets/images/flags/4x3/so.svg +11 -0
- data/app/assets/images/flags/4x3/sr.svg +6 -0
- data/app/assets/images/flags/4x3/ss.svg +8 -0
- data/app/assets/images/flags/4x3/st.svg +16 -0
- data/app/assets/images/flags/4x3/sv.svg +594 -0
- data/app/assets/images/flags/4x3/sx.svg +56 -0
- data/app/assets/images/flags/4x3/sy.svg +6 -0
- data/app/assets/images/flags/4x3/sz.svg +45 -0
- data/app/assets/images/flags/4x3/tc.svg +67 -0
- data/app/assets/images/flags/4x3/td.svg +7 -0
- data/app/assets/images/flags/4x3/tf.svg +15 -0
- data/app/assets/images/flags/4x3/tg.svg +14 -0
- data/app/assets/images/flags/4x3/th.svg +7 -0
- data/app/assets/images/flags/4x3/tj.svg +22 -0
- data/app/assets/images/flags/4x3/tk.svg +5 -0
- data/app/assets/images/flags/4x3/tl.svg +13 -0
- data/app/assets/images/flags/4x3/tm.svg +206 -0
- data/app/assets/images/flags/4x3/tn.svg +13 -0
- data/app/assets/images/flags/4x3/to.svg +10 -0
- data/app/assets/images/flags/4x3/tr.svg +8 -0
- data/app/assets/images/flags/4x3/tt.svg +5 -0
- data/app/assets/images/flags/4x3/tv.svg +16 -0
- data/app/assets/images/flags/4x3/tw.svg +14 -0
- data/app/assets/images/flags/4x3/tz.svg +13 -0
- data/app/assets/images/flags/4x3/ua.svg +6 -0
- data/app/assets/images/flags/4x3/ug.svg +30 -0
- data/app/assets/images/flags/4x3/um.svg +15 -0
- data/app/assets/images/flags/4x3/un.svg +16 -0
- data/app/assets/images/flags/4x3/us.svg +10 -0
- data/app/assets/images/flags/4x3/uy.svg +28 -0
- data/app/assets/images/flags/4x3/uz.svg +30 -0
- data/app/assets/images/flags/4x3/va.svg +479 -0
- data/app/assets/images/flags/4x3/vc.svg +8 -0
- data/app/assets/images/flags/4x3/ve.svg +26 -0
- data/app/assets/images/flags/4x3/vg.svg +127 -0
- data/app/assets/images/flags/4x3/vi.svg +28 -0
- data/app/assets/images/flags/4x3/vn.svg +11 -0
- data/app/assets/images/flags/4x3/vu.svg +18 -0
- data/app/assets/images/flags/4x3/wf.svg +7 -0
- data/app/assets/images/flags/4x3/ws.svg +7 -0
- data/app/assets/images/flags/4x3/xk.svg +16 -0
- data/app/assets/images/flags/4x3/ye.svg +7 -0
- data/app/assets/images/flags/4x3/yt.svg +7 -0
- data/app/assets/images/flags/4x3/za.svg +17 -0
- data/app/assets/images/flags/4x3/zm.svg +27 -0
- data/app/assets/images/flags/4x3/zw.svg +21 -0
- data/app/assets/images/global.svg +1 -0
- data/app/assets/images/pagination-arrow-right.svg +3 -10
- data/app/assets/images/pagination-double-arrow-right.svg +6 -13
- data/app/assets/images/plus.svg +1 -1
- data/app/assets/images/search.svg +1 -1
- data/app/assets/javascripts/spree/frontend/checkout/address.js +19 -10
- data/app/assets/javascripts/spree/frontend/checkout/payment.js +31 -6
- data/app/assets/javascripts/spree/frontend/checkout.js +1 -1
- data/app/assets/javascripts/spree/frontend/login.js +5 -0
- data/app/assets/javascripts/spree/frontend/main_nav_bar.js +86 -0
- data/app/assets/javascripts/spree/frontend/multi_currency.js +13 -0
- data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +53 -10
- data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +84 -14
- data/app/assets/javascripts/spree/frontend/views/spree/shared/product_added_modal.js +7 -0
- data/app/assets/javascripts/spree/frontend/views/spree/shared/variant_select.js +93 -0
- data/app/assets/javascripts/spree/frontend.js +3 -0
- data/app/assets/stylesheets/spree/frontend/application.scss +4 -0
- data/app/assets/stylesheets/spree/frontend/components-bootstrap/carousel.scss +4 -0
- data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +74 -1
- data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-base.scss +23 -0
- data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-list.scss +265 -0
- data/app/assets/stylesheets/spree/frontend/flags/_variables.scss +2 -0
- data/app/assets/stylesheets/spree/frontend/flags/flag-icon.scss +3 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/checkout/delivery.scss +6 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +2 -2
- data/app/assets/stylesheets/spree/frontend/views/spree/products/cart_form.scss +8 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/products/gallery_modal.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +28 -4
- data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/_color_select.scss +10 -9
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/single.scss +1 -1
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/thumbnails.scss +1 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +9 -4
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/change_store.scss +7 -0
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +30 -25
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/mobile_navigation.scss +29 -3
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +24 -7
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/quantity_select.scss +9 -12
- data/app/assets/stylesheets/spree/frontend/views/spree/shared/search_form.scss +12 -0
- data/app/controllers/concerns/spree/checkout/address_book.rb +7 -9
- data/app/controllers/spree/addresses_controller.rb +0 -1
- data/app/controllers/spree/currency_controller.rb +17 -0
- data/app/controllers/spree/products_controller.rb +1 -1
- data/app/controllers/spree/store_controller.rb +4 -0
- data/app/helpers/spree/addresses_helper.rb +37 -7
- data/app/helpers/spree/frontend_helper.rb +26 -2
- data/app/helpers/spree/navigation_helper.rb +4 -1
- data/app/views/kaminari/twitter-bootstrap-4/_first_page.html.erb +1 -1
- data/app/views/kaminari/twitter-bootstrap-4/_last_page.html.erb +1 -1
- data/app/views/kaminari/twitter-bootstrap-4/_next_page.html.erb +1 -1
- data/app/views/kaminari/twitter-bootstrap-4/_prev_page.html.erb +1 -1
- data/app/views/spree/address/_form.html.erb +22 -22
- data/app/views/spree/addresses/_form.html.erb +15 -6
- data/app/views/spree/checkout/_address.html.erb +4 -7
- data/app/views/spree/checkout/_confirm.html.erb +4 -46
- data/app/views/spree/checkout/_delivery.html.erb +10 -3
- data/app/views/spree/checkout/_delivery_informations.html.erb +44 -0
- data/app/views/spree/checkout/_payment.html.erb +4 -4
- data/app/views/spree/checkout/_summary.html.erb +22 -17
- data/app/views/spree/checkout/edit.html.erb +1 -1
- data/app/views/spree/checkout/payment/_gateway.html.erb +1 -1
- data/app/views/spree/checkout/registration.html.erb +2 -2
- data/app/views/spree/errors/not_found.html.erb +2 -2
- data/app/views/spree/home/index.html.erb +29 -35
- data/app/views/spree/layouts/checkout.html.erb +3 -1
- data/app/views/spree/orders/_coupon_code.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 +2 -2
- data/app/views/spree/orders/show.html.erb +1 -1
- data/app/views/spree/products/_cart_form.html.erb +8 -2
- data/app/views/spree/products/_color_option_type.html.erb +15 -14
- data/app/views/spree/products/_description.html.erb +10 -2
- data/app/views/spree/products/_filters_desktop.html.erb +43 -41
- data/app/views/spree/products/_filters_mobile.html.erb +6 -6
- data/app/views/spree/products/_gallery_modal.html.erb +1 -1
- data/app/views/spree/products/_option_type.html.erb +0 -1
- data/app/views/spree/products/_properties.html.erb +6 -4
- data/app/views/spree/products/_sort_desktop.html.erb +6 -6
- data/app/views/spree/products/_sort_mobile.html.erb +8 -8
- data/app/views/spree/products/_vendor_info.html.erb +13 -0
- data/app/views/spree/products/show.html.erb +3 -0
- data/app/views/spree/shared/_breadcrumbs.html.erb +2 -2
- data/app/views/spree/shared/_carousel_4_products.html.erb +1 -1
- data/app/views/spree/shared/_cart.html.erb +1 -1
- data/app/views/spree/shared/_change_store.html.erb +25 -0
- data/app/views/spree/shared/_checkout_header.html.erb +2 -2
- data/app/views/spree/shared/_footer.html.erb +12 -8
- data/app/views/spree/shared/_link_to_account.html.erb +1 -0
- data/app/views/spree/shared/_link_to_cart.html.erb +1 -2
- data/app/views/spree/shared/_login.html.erb +4 -4
- data/app/views/spree/shared/_main_nav_bar.html.erb +46 -40
- data/app/views/spree/shared/_mobile_change_store.html.erb +30 -0
- data/app/views/spree/shared/_mobile_navigation.html.erb +29 -52
- data/app/views/spree/shared/_nav_bar.html.erb +6 -16
- data/app/views/spree/shared/_option_values.html.erb +2 -2
- data/app/views/spree/shared/_quantity_select.html.erb +1 -1
- data/app/views/spree/shared/_search.html.erb +8 -11
- data/app/views/spree/shared/_taxonomies.html.erb +1 -1
- data/app/views/spree/shared/carousel/_thumbnails.html.erb +32 -30
- data/app/views/spree/users/_address.html.erb +17 -21
- data/app/views/spree/users/show.html.erb +2 -2
- data/config/initializers/canonical_rails.rb +1 -1
- data/config/routes.rb +2 -0
- data/spree_frontend.gemspec +5 -5
- metadata +302 -21
- data/app/assets/stylesheets/spree/frontend/_glyphicons_urls_fix.scss +0 -10
@@ -1,3 +1,8 @@
|
|
1
|
+
/* global Cleave */
|
2
|
+
var CARD_NUMBER_SELECTOR = '.cardNumber'
|
3
|
+
var CARD_EXPIRATION_SELECTOR = '.cardExpiry'
|
4
|
+
var CARD_CODE_SELECTOR = '.cardCode'
|
5
|
+
|
1
6
|
//= require spree/frontend/coupon_manager
|
2
7
|
Spree.ready(function ($) {
|
3
8
|
Spree.onPayment = function () {
|
@@ -22,20 +27,40 @@ Spree.ready(function ($) {
|
|
22
27
|
$('#use_existing_card_no').prop('checked', false)
|
23
28
|
$('#use_existing_card_yes').prop('checked', true)
|
24
29
|
$('#payment-methods').hide()
|
30
|
+
Spree.enableSave()
|
25
31
|
})
|
26
32
|
$('#use_existing_card_no').click(function () {
|
27
33
|
$('#payment-methods').show()
|
28
34
|
$('.existing-cc-radio').prop('checked', false)
|
29
35
|
$('#use_existing_card_yes').prop('checked', false)
|
36
|
+
Spree.enableSave()
|
30
37
|
})
|
31
38
|
}
|
32
|
-
|
33
|
-
$(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
39
|
+
|
40
|
+
if ($(CARD_NUMBER_SELECTOR).length > 0 &&
|
41
|
+
$(CARD_EXPIRATION_SELECTOR).length > 0 &&
|
42
|
+
$(CARD_CODE_SELECTOR).length > 0) {
|
43
|
+
/* eslint-disable no-new */
|
44
|
+
new Cleave(CARD_NUMBER_SELECTOR, {
|
45
|
+
creditCard: true,
|
46
|
+
onCreditCardTypeChanged: function (type) {
|
47
|
+
$('.ccType').val(type)
|
48
|
+
}
|
49
|
+
})
|
50
|
+
/* eslint-disable no-new */
|
51
|
+
new Cleave(CARD_EXPIRATION_SELECTOR, {
|
52
|
+
date: true,
|
53
|
+
datePattern: ['m', 'Y']
|
54
|
+
})
|
55
|
+
/* eslint-disable no-new */
|
56
|
+
new Cleave(CARD_CODE_SELECTOR, {
|
57
|
+
numericOnly: true,
|
58
|
+
blocks: [3]
|
59
|
+
})
|
60
|
+
}
|
61
|
+
|
38
62
|
$('input[type="radio"][name="order[payments_attributes][][payment_method_id]"]').click(function () {
|
63
|
+
Spree.enableSave()
|
39
64
|
if ($('#payment_method_' + this.value).find('fieldset').children().length == 0) {
|
40
65
|
$('.payment-sources').hide()
|
41
66
|
} else {
|
@@ -12,7 +12,7 @@ Spree.disableSaveOnClick = function () {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
Spree.enableSave = function () {
|
15
|
-
$('form
|
15
|
+
$('#checkout form').data('submitted', false).find(':submit, :image').attr('disabled', false).addClass('primary').removeClass('disabled')
|
16
16
|
}
|
17
17
|
|
18
18
|
Spree.ready(function () {
|
@@ -0,0 +1,86 @@
|
|
1
|
+
Spree.ready(function () {
|
2
|
+
var $navLinks = $('.main-nav-bar .nav-link.dropdown-toggle')
|
3
|
+
var $dropdownMenu = $('.main-nav-bar .dropdown-menu')
|
4
|
+
var SHOW_CLASS = 'show'
|
5
|
+
var DATA_TOGGLE_ATTR = 'data-toggle'
|
6
|
+
var DATA_TOGGLE_VALUE = 'dropdown'
|
7
|
+
|
8
|
+
function handleMouseInOutNavLinks(event) {
|
9
|
+
var $navLink = $(this)
|
10
|
+
var $parent = $navLink.parent()
|
11
|
+
var $dropdown = $navLink.next()
|
12
|
+
var eventType = event.type
|
13
|
+
|
14
|
+
if (eventType === 'mouseenter') {
|
15
|
+
$navLink.removeAttr(DATA_TOGGLE_ATTR)
|
16
|
+
$parent.addClass(SHOW_CLASS)
|
17
|
+
$dropdown.addClass(SHOW_CLASS)
|
18
|
+
} else if (eventType === 'mouseleave') {
|
19
|
+
var isDropdownHovered = $dropdown.filter(':hover').length
|
20
|
+
var isNavLinkHovered = $navLink.filter(':hover').length
|
21
|
+
if (isDropdownHovered || isNavLinkHovered) {
|
22
|
+
return
|
23
|
+
}
|
24
|
+
$navLink.attr(DATA_TOGGLE_ATTR, DATA_TOGGLE_VALUE)
|
25
|
+
$parent.removeClass(SHOW_CLASS)
|
26
|
+
$dropdown.removeClass(SHOW_CLASS)
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
function handleFocusinNavLink() {
|
31
|
+
var $navLink = $(this)
|
32
|
+
var $parent = $navLink.parent()
|
33
|
+
var $dropdown = $navLink.next()
|
34
|
+
|
35
|
+
$parent.addClass(SHOW_CLASS)
|
36
|
+
$dropdownMenu.removeClass(SHOW_CLASS)
|
37
|
+
$dropdown.addClass(SHOW_CLASS)
|
38
|
+
}
|
39
|
+
|
40
|
+
function handleFocusoutNavLink() {
|
41
|
+
var $navLink = $(this)
|
42
|
+
var $parent = $navLink.parent()
|
43
|
+
var $dropdown = $navLink.next()
|
44
|
+
|
45
|
+
setTimeout(function() {
|
46
|
+
var dropdownHasActiveElement = $.contains($dropdown[0], document.activeElement)
|
47
|
+
|
48
|
+
if (!dropdownHasActiveElement) {
|
49
|
+
$parent.removeClass(SHOW_CLASS)
|
50
|
+
$dropdown.removeClass(SHOW_CLASS)
|
51
|
+
}
|
52
|
+
}, 0)
|
53
|
+
|
54
|
+
}
|
55
|
+
|
56
|
+
function handleMouseleaveDropdown() {
|
57
|
+
var $dropdown = $(this)
|
58
|
+
var isDropdownHovered = $dropdown.filter(':hover').length
|
59
|
+
var isNavLinkHovered = $dropdown.prev().filter(':hover').length
|
60
|
+
if (isDropdownHovered || isNavLinkHovered) {
|
61
|
+
return
|
62
|
+
}
|
63
|
+
$dropdown.parent().removeClass(SHOW_CLASS)
|
64
|
+
$dropdown.removeClass(SHOW_CLASS)
|
65
|
+
}
|
66
|
+
|
67
|
+
function handleFocusoutDropdownItems() {
|
68
|
+
var $dropdownLink = $(this)
|
69
|
+
setTimeout(function() {
|
70
|
+
var $parentDropdown = $dropdownLink.parents('.dropdown-menu')
|
71
|
+
var $navLink = $parentDropdown.parent()
|
72
|
+
var parentHasActiveElement = $.contains($parentDropdown[0], document.activeElement)
|
73
|
+
|
74
|
+
if (!parentHasActiveElement) {
|
75
|
+
$navLink.removeClass(SHOW_CLASS)
|
76
|
+
$parentDropdown.removeClass(SHOW_CLASS)
|
77
|
+
}
|
78
|
+
}, 0)
|
79
|
+
}
|
80
|
+
|
81
|
+
$navLinks.on('mouseenter mouseleave', handleMouseInOutNavLinks);
|
82
|
+
$navLinks.on('focusin', handleFocusinNavLink)
|
83
|
+
$navLinks.on('focusout', handleFocusoutNavLink)
|
84
|
+
$dropdownMenu.on('mouseleave', handleMouseleaveDropdown)
|
85
|
+
$dropdownMenu.on('focusout', '.dropdown-item', handleFocusoutDropdownItems)
|
86
|
+
})
|
@@ -1,5 +1,6 @@
|
|
1
1
|
//= require spree/api/storefront/cart
|
2
2
|
//= require ../shared/product_added_modal
|
3
|
+
//= require ../shared/variant_select
|
3
4
|
|
4
5
|
var ADD_TO_CART_FORM_SELECTOR = '.add-to-cart-form'
|
5
6
|
var VARIANT_ID_SELECTOR = '[name="variant_id"]'
|
@@ -20,21 +21,36 @@ function CartForm($, $cartForm) {
|
|
20
21
|
}
|
21
22
|
|
22
23
|
this.initialize = function() {
|
24
|
+
this.urlQueryMatchFound = false
|
23
25
|
this.selectedOptionValueIds = []
|
24
26
|
this.variants = JSON.parse($cartForm.attr('data-variants'))
|
25
27
|
this.withOptionValues = Boolean($cartForm.find(OPTION_VALUE_SELECTOR).length)
|
26
28
|
|
27
29
|
this.$addToCart = $cartForm.find(ADD_TO_CART_SELECTOR)
|
28
30
|
this.$price = $cartForm.find('.price.selling')
|
31
|
+
this.$compareAtPrice = $cartForm.find('.compare-at-price')
|
29
32
|
this.$variantIdInput = $cartForm.find(VARIANT_ID_SELECTOR)
|
30
33
|
|
31
|
-
this.
|
34
|
+
this.initializeQueryParamsCheck()
|
35
|
+
this.initializeColorVarianTooltip()
|
36
|
+
|
37
|
+
if (this.urlQueryMatchFound) {
|
38
|
+
this.setSelectedVariantFromUrl()
|
39
|
+
} else {
|
40
|
+
this.initializeForm()
|
41
|
+
}
|
32
42
|
}
|
33
43
|
|
34
44
|
this.initializeForm = function() {
|
35
45
|
if (this.withOptionValues) {
|
36
46
|
var $optionValue = this.firstCheckedOptionValue()
|
37
47
|
this.applyCheckedOptionValue($optionValue, true)
|
48
|
+
var singleOptionValues = this.getSingleOptionValuesFromEachOptionType()
|
49
|
+
if (singleOptionValues.length) {
|
50
|
+
singleOptionValues.forEach(function($value) {
|
51
|
+
this.applyCheckedOptionValue($value, true)
|
52
|
+
})
|
53
|
+
}
|
38
54
|
} else {
|
39
55
|
this.updateAddToCart()
|
40
56
|
this.triggerVariantImages()
|
@@ -46,7 +62,9 @@ function CartForm($, $cartForm) {
|
|
46
62
|
}
|
47
63
|
|
48
64
|
this.handleOptionValueClick = function(event) {
|
49
|
-
|
65
|
+
var currentTarget = $(event.currentTarget)
|
66
|
+
this.applyCheckedOptionValue(currentTarget)
|
67
|
+
currentTarget.blur()
|
50
68
|
}.bind(this)
|
51
69
|
|
52
70
|
this.applyCheckedOptionValue = function($optionValue, initialUpdate) {
|
@@ -61,6 +79,8 @@ function CartForm($, $cartForm) {
|
|
61
79
|
if (this.shouldTriggerVariantImage($optionValue)) {
|
62
80
|
this.triggerVariantImages()
|
63
81
|
}
|
82
|
+
|
83
|
+
if (initialUpdate) $optionValue.prop('checked', true)
|
64
84
|
}
|
65
85
|
|
66
86
|
this.saveCheckedOptionValue = function($optionValue) {
|
@@ -120,6 +140,17 @@ function CartForm($, $cartForm) {
|
|
120
140
|
return $cartForm.find(OPTION_VALUE_SELECTOR + '[data-option-type-index=0]' + ':checked')
|
121
141
|
}
|
122
142
|
|
143
|
+
this.getSingleOptionValuesFromEachOptionType = function() {
|
144
|
+
var singleOptionValues = []
|
145
|
+
this.optionTypes().each(function(_, optionType) {
|
146
|
+
var $optionValues = $(optionType).find(OPTION_VALUE_SELECTOR)
|
147
|
+
if ($optionValues.length === 1) {
|
148
|
+
singleOptionValues.push($optionValues.first())
|
149
|
+
}
|
150
|
+
})
|
151
|
+
return singleOptionValues
|
152
|
+
}
|
153
|
+
|
123
154
|
this.shouldTriggerVariantImage = function($optionValue) {
|
124
155
|
return $optionValue.data('is-color') || !this.firstCheckedOptionValue().data('is-color')
|
125
156
|
}
|
@@ -220,7 +251,12 @@ function CartForm($, $cartForm) {
|
|
220
251
|
|
221
252
|
if (!variant) return
|
222
253
|
|
254
|
+
var shouldDisplayCompareAtPrice = variant.should_display_compare_at_price
|
255
|
+
|
223
256
|
this.$price.html(variant.display_price)
|
257
|
+
|
258
|
+
var compareAtPriceContent = shouldDisplayCompareAtPrice ? '<span class="mr-3">' + variant.display_compare_at_price + '</span>' : ''
|
259
|
+
this.$compareAtPrice.html(compareAtPriceContent)
|
224
260
|
}
|
225
261
|
|
226
262
|
this.updateVariantId = function() {
|
@@ -243,21 +279,24 @@ Spree.ready(function($) {
|
|
243
279
|
)
|
244
280
|
}
|
245
281
|
|
282
|
+
Spree.addToCartFormSubmissionOptions = function() {
|
283
|
+
return {};
|
284
|
+
}
|
285
|
+
|
246
286
|
$('#product-details').on('submit', ADD_TO_CART_FORM_SELECTOR, function(event) {
|
247
|
-
var
|
248
|
-
var
|
249
|
-
var
|
250
|
-
var
|
287
|
+
var $cartForm = $(event.currentTarget);
|
288
|
+
var $addToCart = $cartForm.find(ADD_TO_CART_SELECTOR);
|
289
|
+
var variantId = $cartForm.find(VARIANT_ID_SELECTOR).val();
|
290
|
+
var quantity = parseInt($cartForm.find('[name="quantity"]').val());
|
291
|
+
var options = Spree.addToCartFormSubmissionOptions();
|
251
292
|
|
252
293
|
event.preventDefault()
|
253
|
-
$addToCart.prop('disabled', true)
|
254
|
-
variantId = $cartForm.find(VARIANT_ID_SELECTOR).val()
|
255
|
-
quantity = parseInt($cartForm.find('[name="quantity"]').val())
|
294
|
+
$addToCart.prop('disabled', true);
|
256
295
|
Spree.ensureCart(function() {
|
257
296
|
SpreeAPI.Storefront.addToCart(
|
258
297
|
variantId,
|
259
298
|
quantity,
|
260
|
-
|
299
|
+
options, // options hash - you can pass additional parameters here, your backend
|
261
300
|
// needs to be aware of those, see API docs:
|
262
301
|
// https://github.com/spree/spree/blob/master/api/docs/v2/storefront/index.yaml#L42
|
263
302
|
function(response) {
|
@@ -291,4 +330,8 @@ Spree.ready(function($) {
|
|
291
330
|
|
292
331
|
CartForm($, $cartForm)
|
293
332
|
})
|
333
|
+
|
334
|
+
document.addEventListener('turbolinks:request-start', function () {
|
335
|
+
Spree.hideProductAddedModal()
|
336
|
+
})
|
294
337
|
})
|
@@ -1,15 +1,15 @@
|
|
1
|
-
Spree.ready(function($) {
|
2
|
-
$('#sort-by-overlay-show-button').click(function() {
|
1
|
+
Spree.ready(function ($) {
|
2
|
+
$('#sort-by-overlay-show-button').click(function () {
|
3
3
|
$('#sort-by-overlay').show();
|
4
4
|
});
|
5
|
-
$('#sort-by-overlay-hide-button').click(function() {
|
5
|
+
$('#sort-by-overlay-hide-button').click(function () {
|
6
6
|
$('#sort-by-overlay').hide();
|
7
7
|
});
|
8
8
|
|
9
|
-
$('#filter-by-overlay-show-button').click(function() {
|
9
|
+
$('#filter-by-overlay-show-button').click(function () {
|
10
10
|
$('#filter-by-overlay').show();
|
11
11
|
});
|
12
|
-
$('#filter-by-overlay-hide-button').click(function() {
|
12
|
+
$('#filter-by-overlay-hide-button').click(function () {
|
13
13
|
$('#filter-by-overlay').hide();
|
14
14
|
});
|
15
15
|
|
@@ -21,21 +21,91 @@ Spree.ready(function($) {
|
|
21
21
|
$('#no-product-available-close-button').click(closeNoProductModal);
|
22
22
|
$('#no-product-available-hide-button').click(closeNoProductModal);
|
23
23
|
|
24
|
-
|
24
|
+
function customEncodeURI(value) {
|
25
|
+
return encodeURI(
|
26
|
+
value.replace(/\s/g, '+').replace(/'/g, '%27').replace(/\$/g, '%24')
|
27
|
+
).replace(/%25/g, '%');
|
28
|
+
}
|
29
|
+
|
30
|
+
function setNewUrl(searchParams) {
|
31
|
+
history.replaceState(
|
32
|
+
{},
|
33
|
+
'',
|
34
|
+
location.pathname +
|
35
|
+
'?' +
|
36
|
+
customEncodeURI(decodeURIComponent(searchParams.toString()))
|
37
|
+
);
|
38
|
+
Turbolinks.visit(location);
|
39
|
+
}
|
40
|
+
|
41
|
+
function updateFilters(event, $this, removeValue) {
|
42
|
+
event.preventDefault();
|
43
|
+
var data = $this.closest('a[data-params]').data();
|
44
|
+
var searchParams = new URLSearchParams(location.search);
|
45
|
+
var key = data.filterName;
|
46
|
+
var value = data.params[key].toString();
|
47
|
+
|
48
|
+
searchParams.delete('page');
|
49
|
+
if (!searchParams.has('menu_open') && data.params['menu_open']) {
|
50
|
+
searchParams.set('menu_open', data.params['menu_open']);
|
51
|
+
} else if (searchParams.has('menu_open') && !data.params['menu_open']) {
|
52
|
+
searchParams.delete('menu_open');
|
53
|
+
}
|
54
|
+
|
55
|
+
if (searchParams.get(key) === null || !data.multiselect) {
|
56
|
+
searchParams.set(key, value);
|
57
|
+
} else {
|
58
|
+
var arr = searchParams.get(key).toString().split(',');
|
59
|
+
var index = arr.indexOf(data.id.toString());
|
60
|
+
|
61
|
+
if (index > -1 && removeValue) {
|
62
|
+
arr.splice(index, 1);
|
63
|
+
} else {
|
64
|
+
arr.push(data.id.toString());
|
65
|
+
}
|
66
|
+
|
67
|
+
searchParams.set(key, arr.join(','));
|
68
|
+
}
|
69
|
+
|
70
|
+
setNewUrl(searchParams);
|
71
|
+
}
|
72
|
+
|
73
|
+
$('.plp-overlay-card-item').click(function (event) {
|
74
|
+
if (window.URLSearchParams) {
|
75
|
+
updateFilters(
|
76
|
+
event,
|
77
|
+
$(this),
|
78
|
+
$(this).hasClass('plp-overlay-card-item--selected')
|
79
|
+
);
|
80
|
+
}
|
25
81
|
$(this).toggleClass('plp-overlay-card-item--selected');
|
26
82
|
});
|
27
83
|
|
28
|
-
$(
|
29
|
-
|
84
|
+
$(
|
85
|
+
'#filters-accordion .color-select, #plp-filters-accordion .color-select'
|
86
|
+
).click(function (event) {
|
87
|
+
var colorItem = $(this).find('.plp-overlay-color-item');
|
88
|
+
if (window.URLSearchParams) {
|
89
|
+
updateFilters(
|
90
|
+
event,
|
91
|
+
$(this),
|
92
|
+
colorItem.hasClass('color-select-border--selected')
|
93
|
+
);
|
94
|
+
}
|
95
|
+
colorItem.toggleClass('color-select-border--selected');
|
30
96
|
});
|
31
97
|
|
32
98
|
$('.plp-overlay-ul-li').click(function() {
|
33
|
-
$('.plp-overlay-ul-li--active')
|
34
|
-
|
35
|
-
|
99
|
+
$('.plp-overlay-ul-li').removeClass('plp-overlay-ul-li--active')
|
100
|
+
$(this).addClass('plp-overlay-ul-li--active');
|
101
|
+
});
|
36
102
|
|
37
|
-
|
38
|
-
|
39
|
-
.
|
103
|
+
$('.plp-overlay-buttons .done-btn').click(function (event) {
|
104
|
+
if (window.URLSearchParams) {
|
105
|
+
event.preventDefault();
|
106
|
+
var searchParams = new URLSearchParams(location.search);
|
107
|
+
searchParams.delete('menu_open');
|
108
|
+
setNewUrl(searchParams);
|
109
|
+
}
|
40
110
|
});
|
41
111
|
});
|
@@ -0,0 +1,93 @@
|
|
1
|
+
var getQueryString = window.location.search
|
2
|
+
var urlParams = new URLSearchParams(getQueryString)
|
3
|
+
var variantIdFromUrl = urlParams.get('variant')
|
4
|
+
|
5
|
+
this.initializeQueryParamsCheck = function () {
|
6
|
+
if (urlParams.has('variant')) verifyVariantIdMatch()
|
7
|
+
}
|
8
|
+
|
9
|
+
function verifyVariantIdMatch() {
|
10
|
+
this.variants.forEach(function(variant) {
|
11
|
+
if (parseInt(variant.id) === parseInt(variantIdFromUrl)) this.urlQueryMatchFound = true
|
12
|
+
})
|
13
|
+
}
|
14
|
+
|
15
|
+
this.setSelectedVariantFromUrl = function () {
|
16
|
+
this.selectedOptions = []
|
17
|
+
|
18
|
+
this.getVariantOptionsById(variantIdFromUrl)
|
19
|
+
this.sortArrayByOptionTypeIndex(this.selectedOptions)
|
20
|
+
this.clickListOptions(this.selectedOptions)
|
21
|
+
this.updateStructuredData()
|
22
|
+
}
|
23
|
+
|
24
|
+
this.getVariantOptionsById = function(variantIdFromUrl) {
|
25
|
+
this.variants.forEach(function(variant) {
|
26
|
+
if (parseInt(variant.id) === parseInt(variantIdFromUrl)) this.sortOptionValues(variant.option_values)
|
27
|
+
})
|
28
|
+
}
|
29
|
+
|
30
|
+
this.sortOptionValues = function(optVals) {
|
31
|
+
optVals.forEach(buildArray)
|
32
|
+
}
|
33
|
+
|
34
|
+
function buildArray(item) {
|
35
|
+
var container = document.querySelector('ul#product-variants')
|
36
|
+
var target = container.querySelectorAll('.product-variants-variant-values-radio')
|
37
|
+
|
38
|
+
target.forEach(function(inputTag) {
|
39
|
+
if (parseInt(inputTag.value) === item.id && inputTag.dataset.presentation === item.presentation) {
|
40
|
+
this.selectedOptions.push(inputTag)
|
41
|
+
}
|
42
|
+
})
|
43
|
+
}
|
44
|
+
|
45
|
+
this.sortArrayByOptionTypeIndex = function (arrayOfOptions) {
|
46
|
+
arrayOfOptions.sort(function (a, b) {
|
47
|
+
return a.dataset.optionTypeIndex > b.dataset.optionTypeIndex ? 1 : -1;
|
48
|
+
})
|
49
|
+
}
|
50
|
+
|
51
|
+
this.clickListOptions = function(list) {
|
52
|
+
list.forEach(function (item) {
|
53
|
+
item.checked = true
|
54
|
+
var $optionListItem = $(item)
|
55
|
+
this.applyCheckedOptionValue($optionListItem)
|
56
|
+
})
|
57
|
+
}
|
58
|
+
|
59
|
+
this.updateStructuredData = function() {
|
60
|
+
var variant = this.selectedVariant()
|
61
|
+
var host = window.location.host
|
62
|
+
var schemaData = document.body.querySelector("script[type='application/ld+json']")
|
63
|
+
var obj = JSON.parse(schemaData.firstChild.nodeValue)
|
64
|
+
var firstLayer = obj[0]
|
65
|
+
var offers = obj[0].offers
|
66
|
+
|
67
|
+
if (variant.purchasable) {
|
68
|
+
offers.availability = 'InStock'
|
69
|
+
} else {
|
70
|
+
offers.availability = 'OutOfStock'
|
71
|
+
}
|
72
|
+
|
73
|
+
if (variant.sku.length > 1) {
|
74
|
+
firstLayer.sku = variant.sku
|
75
|
+
}
|
76
|
+
|
77
|
+
firstLayer.url = window.location.href
|
78
|
+
offers.url = window.location.href
|
79
|
+
offers.price = variant.price.amount
|
80
|
+
|
81
|
+
if (Array.isArray(variant.images) && (variant.images.length)) {
|
82
|
+
firstLayer.image = host + variant.images[0].url_product
|
83
|
+
}
|
84
|
+
|
85
|
+
schemaData.firstChild.nodeValue = JSON.stringify(obj)
|
86
|
+
}
|
87
|
+
|
88
|
+
this.initializeColorVarianTooltip = function() {
|
89
|
+
var colorVariants = $('.color-select-label[data-toggle="tooltip"]')
|
90
|
+
colorVariants.tooltip({
|
91
|
+
placement: 'bottom'
|
92
|
+
})
|
93
|
+
}
|
@@ -3,6 +3,7 @@
|
|
3
3
|
//= require popper
|
4
4
|
//= require bootstrap
|
5
5
|
//= require jquery.payment
|
6
|
+
//= require cleave
|
6
7
|
//= require spree
|
7
8
|
//= require polyfill.min
|
8
9
|
//= require fetch.umd
|
@@ -36,6 +37,8 @@
|
|
36
37
|
//= require spree/frontend/views/spree/shared/product_added_modal
|
37
38
|
//= require spree/frontend/views/spree/shared/quantity_select
|
38
39
|
//= require spree/frontend/turbolinks_scroll_fix
|
40
|
+
//= require spree/frontend/main_nav_bar
|
41
|
+
//= require spree/frontend/login
|
39
42
|
|
40
43
|
Spree.routes.api_tokens = Spree.pathFor('api_tokens')
|
41
44
|
Spree.routes.ensure_cart = Spree.pathFor('ensure_cart')
|
@@ -8,6 +8,7 @@
|
|
8
8
|
@import "spree/frontend/mixins";
|
9
9
|
@import "spree/frontend/functions";
|
10
10
|
@import "spree/frontend/margins";
|
11
|
+
@import "spree/frontend/flags/flag-icon";
|
11
12
|
|
12
13
|
@import "spree/frontend/components-bootstrap/carousel";
|
13
14
|
@import "spree/frontend/components-bootstrap/button";
|
@@ -25,11 +26,13 @@
|
|
25
26
|
@import "spree/frontend/views/spree/shared/header";
|
26
27
|
@import "spree/frontend/views/spree/shared/login";
|
27
28
|
@import "spree/frontend/views/spree/shared/nav_bar";
|
29
|
+
@import "spree/frontend/views/spree/shared/search_form";
|
28
30
|
@import "spree/frontend/views/spree/shared/order_details";
|
29
31
|
@import "spree/frontend/views/spree/shared/main_nav_bar";
|
30
32
|
@import "spree/frontend/views/spree/errors/not_found";
|
31
33
|
@import "spree/frontend/views/spree/shared/carousel/thumbnails";
|
32
34
|
@import "spree/frontend/views/spree/shared/carousel/single";
|
35
|
+
@import "spree/frontend/views/spree/shared/change_store";
|
33
36
|
@import "spree/frontend/views/spree/home/index";
|
34
37
|
@import "spree/frontend/views/spree/user_passwords/user_passwords";
|
35
38
|
@import "spree/frontend/views/spree/user_sessions/new";
|
@@ -37,6 +40,7 @@
|
|
37
40
|
@import "spree/frontend/components-custom/headers";
|
38
41
|
@import "spree/frontend/components-custom/inputs";
|
39
42
|
@import "spree/frontend/views/spree/checkout/registration";
|
43
|
+
@import "spree/frontend/views/spree/checkout/delivery";
|
40
44
|
@import "spree/frontend/views/spree/checkout/confirm";
|
41
45
|
@import "spree/frontend/views/spree/checkout/payment";
|
42
46
|
@import "spree/frontend/views/spree/orders/edit";
|
@@ -15,6 +15,10 @@
|
|
15
15
|
}
|
16
16
|
&-vertically-animated {
|
17
17
|
// Source: https://stackoverflow.com/questions/42910076/bootstrap-4-alpha-6-vertical-carousel
|
18
|
+
.carousel-item {
|
19
|
+
-webkit-transform: translate3d(0, 0, 0);
|
20
|
+
transform: translate3d(0, 0, 0);
|
21
|
+
}
|
18
22
|
.carousel-item-next.carousel-item-left,
|
19
23
|
.carousel-item-prev.carousel-item-right {
|
20
24
|
-webkit-transform: translate3d(0, 0, 0);
|