solidus_frontend 1.0.0.pre
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_frontend might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/LICENSE +26 -0
- data/README.md +21 -0
- data/app/assets/images/credit_cards/amex_cid.gif +0 -0
- data/app/assets/images/credit_cards/credit_card.gif +0 -0
- data/app/assets/images/credit_cards/discover_cid.gif +0 -0
- data/app/assets/images/credit_cards/icons/american_express.png +0 -0
- data/app/assets/images/credit_cards/icons/cirrus.png +0 -0
- data/app/assets/images/credit_cards/icons/delta.png +0 -0
- data/app/assets/images/credit_cards/icons/diners_club.png +0 -0
- data/app/assets/images/credit_cards/icons/directdebit.png +0 -0
- data/app/assets/images/credit_cards/icons/discover.png +0 -0
- data/app/assets/images/credit_cards/icons/egold.png +0 -0
- data/app/assets/images/credit_cards/icons/maestro.png +0 -0
- data/app/assets/images/credit_cards/icons/master.png +0 -0
- data/app/assets/images/credit_cards/icons/paypal.png +0 -0
- data/app/assets/images/credit_cards/icons/solo.png +0 -0
- data/app/assets/images/credit_cards/icons/switch.png +0 -0
- data/app/assets/images/credit_cards/icons/visa.png +0 -0
- data/app/assets/images/credit_cards/icons/visaelectron.png +0 -0
- data/app/assets/images/credit_cards/icons/westernunion.png +0 -0
- data/app/assets/images/credit_cards/icons/wirecard.png +0 -0
- data/app/assets/images/credit_cards/icons/worldpay.png +0 -0
- data/app/assets/images/credit_cards/master_cid.jpg +0 -0
- data/app/assets/images/credit_cards/visa_cid.gif +0 -0
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/icons/add-to-cart.png +0 -0
- data/app/assets/images/icons/checkout.png +0 -0
- data/app/assets/images/icons/delete.png +0 -0
- data/app/assets/images/icons/update.png +0 -0
- data/app/assets/images/spinner.gif +0 -0
- data/app/assets/images/spree/frontend/cart.png +0 -0
- data/app/assets/images/spree/frontend/select_arrow.gif +0 -0
- data/app/assets/javascripts/spree/frontend/cart.js.coffee +15 -0
- data/app/assets/javascripts/spree/frontend/checkout/address.js.coffee +86 -0
- data/app/assets/javascripts/spree/frontend/checkout/payment.js.coffee +79 -0
- data/app/assets/javascripts/spree/frontend/checkout.js.coffee +11 -0
- data/app/assets/javascripts/spree/frontend/product.js.coffee +47 -0
- data/app/assets/javascripts/spree/frontend.js +5 -0
- data/app/assets/stylesheets/spree/frontend/_variables.scss +61 -0
- data/app/assets/stylesheets/spree/frontend/screen.css.scss +1321 -0
- data/app/assets/stylesheets/spree/frontend.css +6 -0
- data/app/controllers/spree/checkout_controller.rb +167 -0
- data/app/controllers/spree/content_controller.rb +23 -0
- data/app/controllers/spree/home_controller.rb +12 -0
- data/app/controllers/spree/locale_controller.rb +16 -0
- data/app/controllers/spree/orders_controller.rb +115 -0
- data/app/controllers/spree/products_controller.rb +45 -0
- data/app/controllers/spree/store_controller.rb +47 -0
- data/app/controllers/spree/taxons_controller.rb +28 -0
- data/app/models/spree/frontend_configuration.rb +5 -0
- data/app/views/spree/address/_form.html.erb +75 -0
- data/app/views/spree/checkout/_address.html.erb +33 -0
- data/app/views/spree/checkout/_confirm.html.erb +12 -0
- data/app/views/spree/checkout/_delivery.html.erb +100 -0
- data/app/views/spree/checkout/_payment.html.erb +71 -0
- data/app/views/spree/checkout/_summary.html.erb +72 -0
- data/app/views/spree/checkout/edit.html.erb +37 -0
- data/app/views/spree/checkout/payment/_check.html.erb +0 -0
- data/app/views/spree/checkout/payment/_gateway.html.erb +32 -0
- data/app/views/spree/content/cvv.html.erb +13 -0
- data/app/views/spree/content/test.html.erb +1 -0
- data/app/views/spree/home/index.html.erb +12 -0
- data/app/views/spree/layouts/spree_application.html.erb +37 -0
- data/app/views/spree/orders/_adjustment_row.html.erb +8 -0
- data/app/views/spree/orders/_adjustments.html.erb +24 -0
- data/app/views/spree/orders/_form.html.erb +28 -0
- data/app/views/spree/orders/_line_item.html.erb +36 -0
- data/app/views/spree/orders/edit.html.erb +47 -0
- data/app/views/spree/orders/show.html.erb +22 -0
- data/app/views/spree/payments/_payment.html.erb +18 -0
- data/app/views/spree/products/_cart_form.html.erb +65 -0
- data/app/views/spree/products/_image.html.erb +5 -0
- data/app/views/spree/products/_promotions.html.erb +19 -0
- data/app/views/spree/products/_properties.html.erb +15 -0
- data/app/views/spree/products/_taxons.html.erb +14 -0
- data/app/views/spree/products/_thumbnails.html.erb +19 -0
- data/app/views/spree/products/index.html.erb +27 -0
- data/app/views/spree/products/show.html.erb +51 -0
- data/app/views/spree/shared/_address.html.erb +38 -0
- data/app/views/spree/shared/_filters.html.erb +27 -0
- data/app/views/spree/shared/_footer.html.erb +6 -0
- data/app/views/spree/shared/_google_analytics.html.erb +36 -0
- data/app/views/spree/shared/_head.html.erb +14 -0
- data/app/views/spree/shared/_header.html.erb +5 -0
- data/app/views/spree/shared/_link_to_cart.html.erb +1 -0
- data/app/views/spree/shared/_main_nav_bar.html.erb +12 -0
- data/app/views/spree/shared/_nav_bar.html.erb +7 -0
- data/app/views/spree/shared/_order_details.html.erb +147 -0
- data/app/views/spree/shared/_products.html.erb +46 -0
- data/app/views/spree/shared/_search.html.erb +11 -0
- data/app/views/spree/shared/_shipment_tracking.html.erb +9 -0
- data/app/views/spree/shared/_sidebar.html.erb +3 -0
- data/app/views/spree/shared/_taxonomies.html.erb +9 -0
- data/app/views/spree/shared/unauthorized.html.erb +0 -0
- data/app/views/spree/store/cart_link.html.erb +1 -0
- data/app/views/spree/taxons/_taxon.html.erb +4 -0
- data/app/views/spree/taxons/show.html.erb +20 -0
- data/config/initializers/assets.rb +1 -0
- data/config/initializers/canonical_rails.rb +15 -0
- data/config/initializers/check_for_orphaned_preferences.rb +9 -0
- data/config/initializers/deprecation_checker.rb +7 -0
- data/config/initializers/rails_5868.rb +8 -0
- data/config/initializers/spree.rb +4 -0
- data/config/routes.rb +37 -0
- data/lib/solidus_frontend.rb +1 -0
- data/lib/spree/frontend/engine.rb +19 -0
- data/lib/spree/frontend/middleware/seo_assist.rb +51 -0
- data/lib/spree/frontend/preference_rescue.rb +25 -0
- data/lib/spree/frontend.rb +10 -0
- data/lib/spree_frontend.rb +1 -0
- data/lib/tasks/rake_util.rb +19 -0
- data/lib/tasks/taxon.rake +14 -0
- data/vendor/assets/images/datepicker/cal.gif +0 -0
- data/vendor/assets/images/flags/ad.png +0 -0
- data/vendor/assets/images/flags/ae.png +0 -0
- data/vendor/assets/images/flags/af.png +0 -0
- data/vendor/assets/images/flags/ag.png +0 -0
- data/vendor/assets/images/flags/ai.png +0 -0
- data/vendor/assets/images/flags/al.png +0 -0
- data/vendor/assets/images/flags/am.png +0 -0
- data/vendor/assets/images/flags/an.png +0 -0
- data/vendor/assets/images/flags/ao.png +0 -0
- data/vendor/assets/images/flags/ar.png +0 -0
- data/vendor/assets/images/flags/as.png +0 -0
- data/vendor/assets/images/flags/at.png +0 -0
- data/vendor/assets/images/flags/au.png +0 -0
- data/vendor/assets/images/flags/aw.png +0 -0
- data/vendor/assets/images/flags/ax.png +0 -0
- data/vendor/assets/images/flags/az.png +0 -0
- data/vendor/assets/images/flags/ba.png +0 -0
- data/vendor/assets/images/flags/bb.png +0 -0
- data/vendor/assets/images/flags/bd.png +0 -0
- data/vendor/assets/images/flags/be.png +0 -0
- data/vendor/assets/images/flags/bf.png +0 -0
- data/vendor/assets/images/flags/bg.png +0 -0
- data/vendor/assets/images/flags/bh.png +0 -0
- data/vendor/assets/images/flags/bi.png +0 -0
- data/vendor/assets/images/flags/bj.png +0 -0
- data/vendor/assets/images/flags/bm.png +0 -0
- data/vendor/assets/images/flags/bn.png +0 -0
- data/vendor/assets/images/flags/bo.png +0 -0
- data/vendor/assets/images/flags/br.png +0 -0
- data/vendor/assets/images/flags/bs.png +0 -0
- data/vendor/assets/images/flags/bt.png +0 -0
- data/vendor/assets/images/flags/bv.png +0 -0
- data/vendor/assets/images/flags/bw.png +0 -0
- data/vendor/assets/images/flags/by.png +0 -0
- data/vendor/assets/images/flags/bz.png +0 -0
- data/vendor/assets/images/flags/ca.png +0 -0
- data/vendor/assets/images/flags/catalonia.png +0 -0
- data/vendor/assets/images/flags/cc.png +0 -0
- data/vendor/assets/images/flags/cd.png +0 -0
- data/vendor/assets/images/flags/cf.png +0 -0
- data/vendor/assets/images/flags/cg.png +0 -0
- data/vendor/assets/images/flags/ch.png +0 -0
- data/vendor/assets/images/flags/ci.png +0 -0
- data/vendor/assets/images/flags/ck.png +0 -0
- data/vendor/assets/images/flags/cl.png +0 -0
- data/vendor/assets/images/flags/cm.png +0 -0
- data/vendor/assets/images/flags/cn.png +0 -0
- data/vendor/assets/images/flags/co.png +0 -0
- data/vendor/assets/images/flags/cr.png +0 -0
- data/vendor/assets/images/flags/cs.png +0 -0
- data/vendor/assets/images/flags/cu.png +0 -0
- data/vendor/assets/images/flags/cv.png +0 -0
- data/vendor/assets/images/flags/cx.png +0 -0
- data/vendor/assets/images/flags/cy.png +0 -0
- data/vendor/assets/images/flags/cz.png +0 -0
- data/vendor/assets/images/flags/de.png +0 -0
- data/vendor/assets/images/flags/dj.png +0 -0
- data/vendor/assets/images/flags/dk.png +0 -0
- data/vendor/assets/images/flags/dm.png +0 -0
- data/vendor/assets/images/flags/do.png +0 -0
- data/vendor/assets/images/flags/dz.png +0 -0
- data/vendor/assets/images/flags/ec.png +0 -0
- data/vendor/assets/images/flags/ee.png +0 -0
- data/vendor/assets/images/flags/eg.png +0 -0
- data/vendor/assets/images/flags/eh.png +0 -0
- data/vendor/assets/images/flags/england.png +0 -0
- data/vendor/assets/images/flags/er.png +0 -0
- data/vendor/assets/images/flags/es.png +0 -0
- data/vendor/assets/images/flags/et.png +0 -0
- data/vendor/assets/images/flags/europeanunion.png +0 -0
- data/vendor/assets/images/flags/fam.png +0 -0
- data/vendor/assets/images/flags/fi.png +0 -0
- data/vendor/assets/images/flags/fj.png +0 -0
- data/vendor/assets/images/flags/fk.png +0 -0
- data/vendor/assets/images/flags/fm.png +0 -0
- data/vendor/assets/images/flags/fo.png +0 -0
- data/vendor/assets/images/flags/fr.png +0 -0
- data/vendor/assets/images/flags/ga.png +0 -0
- data/vendor/assets/images/flags/gb.png +0 -0
- data/vendor/assets/images/flags/gd.png +0 -0
- data/vendor/assets/images/flags/ge.png +0 -0
- data/vendor/assets/images/flags/gf.png +0 -0
- data/vendor/assets/images/flags/gh.png +0 -0
- data/vendor/assets/images/flags/gi.png +0 -0
- data/vendor/assets/images/flags/gl.png +0 -0
- data/vendor/assets/images/flags/gm.png +0 -0
- data/vendor/assets/images/flags/gn.png +0 -0
- data/vendor/assets/images/flags/gp.png +0 -0
- data/vendor/assets/images/flags/gq.png +0 -0
- data/vendor/assets/images/flags/gr.png +0 -0
- data/vendor/assets/images/flags/gs.png +0 -0
- data/vendor/assets/images/flags/gt.png +0 -0
- data/vendor/assets/images/flags/gu.png +0 -0
- data/vendor/assets/images/flags/gw.png +0 -0
- data/vendor/assets/images/flags/gy.png +0 -0
- data/vendor/assets/images/flags/hk.png +0 -0
- data/vendor/assets/images/flags/hm.png +0 -0
- data/vendor/assets/images/flags/hn.png +0 -0
- data/vendor/assets/images/flags/hr.png +0 -0
- data/vendor/assets/images/flags/ht.png +0 -0
- data/vendor/assets/images/flags/hu.png +0 -0
- data/vendor/assets/images/flags/id.png +0 -0
- data/vendor/assets/images/flags/ie.png +0 -0
- data/vendor/assets/images/flags/il.png +0 -0
- data/vendor/assets/images/flags/in.png +0 -0
- data/vendor/assets/images/flags/io.png +0 -0
- data/vendor/assets/images/flags/iq.png +0 -0
- data/vendor/assets/images/flags/ir.png +0 -0
- data/vendor/assets/images/flags/is.png +0 -0
- data/vendor/assets/images/flags/it.png +0 -0
- data/vendor/assets/images/flags/ja.png +0 -0
- data/vendor/assets/images/flags/jm.png +0 -0
- data/vendor/assets/images/flags/jo.png +0 -0
- data/vendor/assets/images/flags/ke.png +0 -0
- data/vendor/assets/images/flags/kg.png +0 -0
- data/vendor/assets/images/flags/kh.png +0 -0
- data/vendor/assets/images/flags/ki.png +0 -0
- data/vendor/assets/images/flags/km.png +0 -0
- data/vendor/assets/images/flags/kn.png +0 -0
- data/vendor/assets/images/flags/kp.png +0 -0
- data/vendor/assets/images/flags/kr.png +0 -0
- data/vendor/assets/images/flags/kw.png +0 -0
- data/vendor/assets/images/flags/ky.png +0 -0
- data/vendor/assets/images/flags/kz.png +0 -0
- data/vendor/assets/images/flags/la.png +0 -0
- data/vendor/assets/images/flags/lb.png +0 -0
- data/vendor/assets/images/flags/lc.png +0 -0
- data/vendor/assets/images/flags/li.png +0 -0
- data/vendor/assets/images/flags/lk.png +0 -0
- data/vendor/assets/images/flags/lr.png +0 -0
- data/vendor/assets/images/flags/ls.png +0 -0
- data/vendor/assets/images/flags/lt.png +0 -0
- data/vendor/assets/images/flags/lu.png +0 -0
- data/vendor/assets/images/flags/lv.png +0 -0
- data/vendor/assets/images/flags/ly.png +0 -0
- data/vendor/assets/images/flags/ma.png +0 -0
- data/vendor/assets/images/flags/mc.png +0 -0
- data/vendor/assets/images/flags/md.png +0 -0
- data/vendor/assets/images/flags/me.png +0 -0
- data/vendor/assets/images/flags/mg.png +0 -0
- data/vendor/assets/images/flags/mh.png +0 -0
- data/vendor/assets/images/flags/mk.png +0 -0
- data/vendor/assets/images/flags/ml.png +0 -0
- data/vendor/assets/images/flags/mm.png +0 -0
- data/vendor/assets/images/flags/mn.png +0 -0
- data/vendor/assets/images/flags/mo.png +0 -0
- data/vendor/assets/images/flags/mp.png +0 -0
- data/vendor/assets/images/flags/mq.png +0 -0
- data/vendor/assets/images/flags/mr.png +0 -0
- data/vendor/assets/images/flags/ms.png +0 -0
- data/vendor/assets/images/flags/mt.png +0 -0
- data/vendor/assets/images/flags/mu.png +0 -0
- data/vendor/assets/images/flags/mv.png +0 -0
- data/vendor/assets/images/flags/mw.png +0 -0
- data/vendor/assets/images/flags/mx.png +0 -0
- data/vendor/assets/images/flags/my.png +0 -0
- data/vendor/assets/images/flags/mz.png +0 -0
- data/vendor/assets/images/flags/na.png +0 -0
- data/vendor/assets/images/flags/nc.png +0 -0
- data/vendor/assets/images/flags/ne.png +0 -0
- data/vendor/assets/images/flags/nf.png +0 -0
- data/vendor/assets/images/flags/ng.png +0 -0
- data/vendor/assets/images/flags/ni.png +0 -0
- data/vendor/assets/images/flags/nl.png +0 -0
- data/vendor/assets/images/flags/no.png +0 -0
- data/vendor/assets/images/flags/np.png +0 -0
- data/vendor/assets/images/flags/nr.png +0 -0
- data/vendor/assets/images/flags/nu.png +0 -0
- data/vendor/assets/images/flags/nz.png +0 -0
- data/vendor/assets/images/flags/om.png +0 -0
- data/vendor/assets/images/flags/pa.png +0 -0
- data/vendor/assets/images/flags/pe.png +0 -0
- data/vendor/assets/images/flags/pf.png +0 -0
- data/vendor/assets/images/flags/pg.png +0 -0
- data/vendor/assets/images/flags/ph.png +0 -0
- data/vendor/assets/images/flags/pk.png +0 -0
- data/vendor/assets/images/flags/pl.png +0 -0
- data/vendor/assets/images/flags/pm.png +0 -0
- data/vendor/assets/images/flags/pn.png +0 -0
- data/vendor/assets/images/flags/pr.png +0 -0
- data/vendor/assets/images/flags/ps.png +0 -0
- data/vendor/assets/images/flags/pt.png +0 -0
- data/vendor/assets/images/flags/pw.png +0 -0
- data/vendor/assets/images/flags/py.png +0 -0
- data/vendor/assets/images/flags/qa.png +0 -0
- data/vendor/assets/images/flags/re.png +0 -0
- data/vendor/assets/images/flags/ro.png +0 -0
- data/vendor/assets/images/flags/rs.png +0 -0
- data/vendor/assets/images/flags/ru.png +0 -0
- data/vendor/assets/images/flags/rw.png +0 -0
- data/vendor/assets/images/flags/sa.png +0 -0
- data/vendor/assets/images/flags/sb.png +0 -0
- data/vendor/assets/images/flags/sc.png +0 -0
- data/vendor/assets/images/flags/scotland.png +0 -0
- data/vendor/assets/images/flags/sd.png +0 -0
- data/vendor/assets/images/flags/se.png +0 -0
- data/vendor/assets/images/flags/sg.png +0 -0
- data/vendor/assets/images/flags/sh.png +0 -0
- data/vendor/assets/images/flags/si.png +0 -0
- data/vendor/assets/images/flags/sj.png +0 -0
- data/vendor/assets/images/flags/sk.png +0 -0
- data/vendor/assets/images/flags/sl.png +0 -0
- data/vendor/assets/images/flags/sm.png +0 -0
- data/vendor/assets/images/flags/sn.png +0 -0
- data/vendor/assets/images/flags/so.png +0 -0
- data/vendor/assets/images/flags/sr.png +0 -0
- data/vendor/assets/images/flags/st.png +0 -0
- data/vendor/assets/images/flags/sv.png +0 -0
- data/vendor/assets/images/flags/sy.png +0 -0
- data/vendor/assets/images/flags/sz.png +0 -0
- data/vendor/assets/images/flags/tc.png +0 -0
- data/vendor/assets/images/flags/td.png +0 -0
- data/vendor/assets/images/flags/tf.png +0 -0
- data/vendor/assets/images/flags/tg.png +0 -0
- data/vendor/assets/images/flags/th.png +0 -0
- data/vendor/assets/images/flags/tj.png +0 -0
- data/vendor/assets/images/flags/tk.png +0 -0
- data/vendor/assets/images/flags/tl.png +0 -0
- data/vendor/assets/images/flags/tm.png +0 -0
- data/vendor/assets/images/flags/tn.png +0 -0
- data/vendor/assets/images/flags/to.png +0 -0
- data/vendor/assets/images/flags/tr.png +0 -0
- data/vendor/assets/images/flags/tt.png +0 -0
- data/vendor/assets/images/flags/tv.png +0 -0
- data/vendor/assets/images/flags/tw.png +0 -0
- data/vendor/assets/images/flags/tz.png +0 -0
- data/vendor/assets/images/flags/ua.png +0 -0
- data/vendor/assets/images/flags/ug.png +0 -0
- data/vendor/assets/images/flags/um.png +0 -0
- data/vendor/assets/images/flags/us.png +0 -0
- data/vendor/assets/images/flags/uy.png +0 -0
- data/vendor/assets/images/flags/uz.png +0 -0
- data/vendor/assets/images/flags/va.png +0 -0
- data/vendor/assets/images/flags/vc.png +0 -0
- data/vendor/assets/images/flags/ve.png +0 -0
- data/vendor/assets/images/flags/vg.png +0 -0
- data/vendor/assets/images/flags/vi.png +0 -0
- data/vendor/assets/images/flags/vn.png +0 -0
- data/vendor/assets/images/flags/vu.png +0 -0
- data/vendor/assets/images/flags/wales.png +0 -0
- data/vendor/assets/images/flags/wf.png +0 -0
- data/vendor/assets/images/flags/ws.png +0 -0
- data/vendor/assets/images/flags/ye.png +0 -0
- data/vendor/assets/images/flags/yt.png +0 -0
- data/vendor/assets/images/flags/za.png +0 -0
- data/vendor/assets/images/flags/zm.png +0 -0
- data/vendor/assets/images/flags/zw.png +0 -0
- data/vendor/assets/images/jquery.formalize/button.png +0 -0
- data/vendor/assets/images/jquery.formalize/select_arrow.gif +0 -0
- data/vendor/assets/javascripts/jquery.formalize.min.js +1 -0
- data/vendor/assets/javascripts/jquery.validate/additional-methods.min.js +12 -0
- data/vendor/assets/javascripts/jquery.validate/jquery.validate.min.js +12 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ar.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_bg.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ca.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_cs.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_da.js +22 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_de.js +22 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_el.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_es.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_et.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_eu.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_fa.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_fi.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_fr.js +47 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ge.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_he.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_hr.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_hu.js +24 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_it.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ja.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ka.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_kk.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ko.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_lt.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_lv.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ms.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_nl.js +35 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_no.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_pl.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ptbr.js +24 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ptpt.js +24 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ro.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_ru.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_se.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_si.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_sk.js +22 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_sl.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_sr.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_sv.js +23 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_th.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_tr.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_tw.js +24 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_uk.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_vi.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_zh.js +25 -0
- data/vendor/assets/javascripts/jquery.validate/localization/messages_zhtw.js +26 -0
- data/vendor/assets/javascripts/jquery.validate/localization/methods_de.js +12 -0
- data/vendor/assets/javascripts/jquery.validate/localization/methods_nl.js +9 -0
- data/vendor/assets/javascripts/jquery.validate/localization/methods_pt.js +9 -0
- data/vendor/assets/stylesheets/jquery.formalize.css.erb +363 -0
- metadata +527 -0
@@ -0,0 +1,167 @@
|
|
1
|
+
module Spree
|
2
|
+
# This is somewhat contrary to standard REST convention since there is not
|
3
|
+
# actually a Checkout object. There's enough distinct logic specific to
|
4
|
+
# checkout which has nothing to do with updating an order that this approach
|
5
|
+
# is waranted.
|
6
|
+
class CheckoutController < Spree::StoreController
|
7
|
+
before_filter :load_order
|
8
|
+
around_filter :lock_order
|
9
|
+
before_filter :ensure_valid_state_lock_version, only: [:update]
|
10
|
+
before_filter :set_state_if_present
|
11
|
+
|
12
|
+
before_action :ensure_order_not_completed
|
13
|
+
before_action :ensure_checkout_allowed
|
14
|
+
before_action :ensure_sufficient_stock_lines
|
15
|
+
before_action :ensure_valid_state
|
16
|
+
|
17
|
+
before_action :associate_user
|
18
|
+
before_action :check_authorization
|
19
|
+
before_action :apply_coupon_code
|
20
|
+
|
21
|
+
before_action :setup_for_current_state
|
22
|
+
|
23
|
+
helper 'spree/orders'
|
24
|
+
|
25
|
+
rescue_from Spree::Core::GatewayError, :with => :rescue_from_spree_gateway_error
|
26
|
+
|
27
|
+
# Updates the order and advances to the next state (when possible.)
|
28
|
+
def update
|
29
|
+
if @order.update_from_params(params, permitted_checkout_attributes, request.headers.env)
|
30
|
+
@order.temporary_address = !params[:save_user_address]
|
31
|
+
success = if @order.state == 'confirm'
|
32
|
+
@order.complete
|
33
|
+
else
|
34
|
+
@order.next
|
35
|
+
end
|
36
|
+
if !success
|
37
|
+
flash[:error] = @order.errors.full_messages.join("\n")
|
38
|
+
redirect_to checkout_state_path(@order.state) and return
|
39
|
+
end
|
40
|
+
|
41
|
+
if @order.completed?
|
42
|
+
@current_order = nil
|
43
|
+
flash.notice = Spree.t(:order_processed_successfully)
|
44
|
+
flash['order_completed'] = true
|
45
|
+
redirect_to completion_route
|
46
|
+
else
|
47
|
+
redirect_to checkout_state_path(@order.state)
|
48
|
+
end
|
49
|
+
else
|
50
|
+
render :edit
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
def ensure_valid_state
|
56
|
+
unless skip_state_validation?
|
57
|
+
if (params[:state] && !@order.has_checkout_step?(params[:state])) ||
|
58
|
+
(!params[:state] && !@order.has_checkout_step?(@order.state))
|
59
|
+
@order.state = 'cart'
|
60
|
+
redirect_to checkout_state_path(@order.checkout_steps.first)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Fix for #4117
|
65
|
+
# If confirmation of payment fails, redirect back to payment screen
|
66
|
+
if params[:state] == "confirm" && @order.payment_required? && @order.payments.valid.empty?
|
67
|
+
flash.keep
|
68
|
+
redirect_to checkout_state_path("payment")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# Should be overriden if you have areas of your checkout that don't match
|
73
|
+
# up to a step within checkout_steps, such as a registration step
|
74
|
+
def skip_state_validation?
|
75
|
+
false
|
76
|
+
end
|
77
|
+
|
78
|
+
def load_order
|
79
|
+
@order = current_order
|
80
|
+
redirect_to spree.cart_path and return unless @order
|
81
|
+
end
|
82
|
+
|
83
|
+
def ensure_valid_state_lock_version
|
84
|
+
if params[:order] && params[:order][:state_lock_version]
|
85
|
+
@order.with_lock do
|
86
|
+
unless @order.state_lock_version == params[:order].delete(:state_lock_version).to_i
|
87
|
+
flash[:error] = Spree.t(:order_already_updated)
|
88
|
+
redirect_to checkout_state_path(@order.state) and return
|
89
|
+
end
|
90
|
+
@order.increment!(:state_lock_version)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def set_state_if_present
|
96
|
+
if params[:state]
|
97
|
+
redirect_to checkout_state_path(@order.state) if @order.can_go_to_state?(params[:state]) && !skip_state_validation?
|
98
|
+
@order.state = params[:state]
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def ensure_checkout_allowed
|
103
|
+
unless @order.checkout_allowed?
|
104
|
+
redirect_to spree.cart_path
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def ensure_order_not_completed
|
109
|
+
redirect_to spree.cart_path if @order.completed?
|
110
|
+
end
|
111
|
+
|
112
|
+
def ensure_sufficient_stock_lines
|
113
|
+
if @order.insufficient_stock_lines.present?
|
114
|
+
flash[:error] = Spree.t(:inventory_error_flash_for_insufficient_quantity)
|
115
|
+
redirect_to spree.cart_path
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# Provides a route to redirect after order completion
|
120
|
+
def completion_route
|
121
|
+
spree.order_path(@order)
|
122
|
+
end
|
123
|
+
|
124
|
+
def setup_for_current_state
|
125
|
+
method_name = :"before_#{@order.state}"
|
126
|
+
send(method_name) if respond_to?(method_name, true)
|
127
|
+
end
|
128
|
+
|
129
|
+
def before_address
|
130
|
+
# if the user has a default address, a callback takes care of setting
|
131
|
+
# that; but if he doesn't, we need to build an empty one here
|
132
|
+
@order.bill_address ||= Address.build_default
|
133
|
+
@order.ship_address ||= Address.build_default if @order.checkout_steps.include?('delivery')
|
134
|
+
end
|
135
|
+
|
136
|
+
def before_delivery
|
137
|
+
return if params[:order].present?
|
138
|
+
|
139
|
+
packages = @order.shipments.map { |s| s.to_package }
|
140
|
+
@differentiator = Spree::Stock::Differentiator.new(@order, packages)
|
141
|
+
end
|
142
|
+
|
143
|
+
def before_payment
|
144
|
+
if @order.checkout_steps.include? "delivery"
|
145
|
+
packages = @order.shipments.map { |s| s.to_package }
|
146
|
+
@differentiator = Spree::Stock::Differentiator.new(@order, packages)
|
147
|
+
@differentiator.missing.each do |variant, quantity|
|
148
|
+
@order.contents.remove(variant, quantity)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
if try_spree_current_user && try_spree_current_user.respond_to?(:payment_sources)
|
153
|
+
@payment_sources = try_spree_current_user.payment_sources
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
def rescue_from_spree_gateway_error(exception)
|
158
|
+
flash.now[:error] = Spree.t(:spree_gateway_error_flash_for_checkout)
|
159
|
+
@order.errors.add(:base, exception.message)
|
160
|
+
render :edit
|
161
|
+
end
|
162
|
+
|
163
|
+
def check_authorization
|
164
|
+
authorize!(:edit, current_order, cookies.signed[:guest_token])
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Spree
|
2
|
+
class ContentController < Spree::StoreController
|
3
|
+
# Don't serve local files or static assets
|
4
|
+
before_filter { render_404 if params[:path] =~ /(\.|\\)/ }
|
5
|
+
after_action :fire_visited_path, only: :show
|
6
|
+
|
7
|
+
rescue_from ActionView::MissingTemplate, :with => :render_404
|
8
|
+
|
9
|
+
respond_to :html
|
10
|
+
|
11
|
+
def show
|
12
|
+
render :action => params[:path]
|
13
|
+
end
|
14
|
+
|
15
|
+
def cvv
|
16
|
+
render :layout => false
|
17
|
+
end
|
18
|
+
|
19
|
+
def fire_visited_path
|
20
|
+
Spree::PromotionHandler::Page.new(current_order, params[:path]).activate
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Spree
|
2
|
+
class HomeController < Spree::StoreController
|
3
|
+
helper 'spree/products'
|
4
|
+
respond_to :html
|
5
|
+
|
6
|
+
def index
|
7
|
+
@searcher = build_searcher(params.merge(include_images: true))
|
8
|
+
@products = @searcher.retrieve_products
|
9
|
+
@taxonomies = Spree::Taxonomy.includes(root: :children)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Spree
|
2
|
+
class LocaleController < Spree::StoreController
|
3
|
+
def set
|
4
|
+
if request.referer && request.referer.starts_with?('http://' + request.host)
|
5
|
+
session['user_return_to'] = request.referer
|
6
|
+
end
|
7
|
+
if params[:locale] && I18n.available_locales.map(&:to_s).include?(params[:locale])
|
8
|
+
session[:locale] = I18n.locale = params[:locale]
|
9
|
+
flash.notice = Spree.t(:locale_changed)
|
10
|
+
else
|
11
|
+
flash[:error] = Spree.t(:locale_not_changed)
|
12
|
+
end
|
13
|
+
redirect_back_or_default(spree.root_path)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,115 @@
|
|
1
|
+
module Spree
|
2
|
+
class OrdersController < Spree::StoreController
|
3
|
+
before_action :check_authorization
|
4
|
+
rescue_from ActiveRecord::RecordNotFound, :with => :render_404
|
5
|
+
helper 'spree/products', 'spree/orders'
|
6
|
+
|
7
|
+
respond_to :html
|
8
|
+
|
9
|
+
before_filter :assign_order, only: :update
|
10
|
+
# note: do not lock the #edit action because that's where we redirect when we fail to acquire a lock
|
11
|
+
around_filter :lock_order, only: :update
|
12
|
+
before_filter :apply_coupon_code, only: :update
|
13
|
+
skip_before_filter :verify_authenticity_token, only: [:populate]
|
14
|
+
|
15
|
+
def show
|
16
|
+
@order = Order.find_by_number!(params[:id])
|
17
|
+
end
|
18
|
+
|
19
|
+
def update
|
20
|
+
if @order.contents.update_cart(order_params)
|
21
|
+
respond_with(@order) do |format|
|
22
|
+
format.html do
|
23
|
+
if params.has_key?(:checkout)
|
24
|
+
@order.next if @order.cart?
|
25
|
+
redirect_to checkout_state_path(@order.checkout_steps.first)
|
26
|
+
else
|
27
|
+
redirect_to cart_path
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
else
|
32
|
+
respond_with(@order)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Shows the current incomplete order from the session
|
37
|
+
def edit
|
38
|
+
@order = current_order || Order.incomplete.find_or_initialize_by(guest_token: cookies.signed[:guest_token])
|
39
|
+
associate_user
|
40
|
+
end
|
41
|
+
|
42
|
+
# Adds a new item to the order (creating a new order if none already exists)
|
43
|
+
def populate
|
44
|
+
order = current_order(create_order_if_necessary: true)
|
45
|
+
variant = Spree::Variant.find(params[:variant_id])
|
46
|
+
quantity = params[:quantity].to_i
|
47
|
+
|
48
|
+
# 2,147,483,647 is crazy. See issue #2695.
|
49
|
+
if quantity.between?(1, 2_147_483_647)
|
50
|
+
begin
|
51
|
+
order.contents.add(variant, quantity)
|
52
|
+
rescue ActiveRecord::RecordInvalid => e
|
53
|
+
error = e.record.errors.full_messages.join(", ")
|
54
|
+
end
|
55
|
+
else
|
56
|
+
error = Spree.t(:please_enter_reasonable_quantity)
|
57
|
+
end
|
58
|
+
|
59
|
+
if error
|
60
|
+
flash[:error] = error
|
61
|
+
redirect_back_or_default(spree.root_path)
|
62
|
+
else
|
63
|
+
respond_with(order) do |format|
|
64
|
+
format.html { redirect_to cart_path }
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def empty
|
70
|
+
if @order = current_order
|
71
|
+
@order.empty!
|
72
|
+
end
|
73
|
+
|
74
|
+
redirect_to spree.cart_path
|
75
|
+
end
|
76
|
+
|
77
|
+
def accurate_title
|
78
|
+
if @order && @order.completed?
|
79
|
+
Spree.t(:order_number, :number => @order.number)
|
80
|
+
else
|
81
|
+
Spree.t(:shopping_cart)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
def check_authorization
|
86
|
+
cookies.permanent.signed[:guest_token] = params[:token] if params[:token]
|
87
|
+
order = Spree::Order.find_by_number(params[:id]) || current_order
|
88
|
+
|
89
|
+
if order
|
90
|
+
authorize! :edit, order, cookies.signed[:guest_token]
|
91
|
+
else
|
92
|
+
authorize! :create, Spree::Order
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
private
|
97
|
+
|
98
|
+
def order_params
|
99
|
+
if params[:order]
|
100
|
+
params[:order].permit(*permitted_order_attributes)
|
101
|
+
else
|
102
|
+
{}
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
def assign_order
|
107
|
+
@order = current_order
|
108
|
+
unless @order
|
109
|
+
flash[:error] = Spree.t(:order_not_found)
|
110
|
+
redirect_to root_path and return
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
115
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module Spree
|
2
|
+
class ProductsController < Spree::StoreController
|
3
|
+
before_action :load_product, only: :show
|
4
|
+
before_action :load_taxon, only: :index
|
5
|
+
|
6
|
+
rescue_from ActiveRecord::RecordNotFound, :with => :render_404
|
7
|
+
helper 'spree/taxons'
|
8
|
+
|
9
|
+
respond_to :html
|
10
|
+
|
11
|
+
def index
|
12
|
+
@searcher = build_searcher(params.merge(include_images: true))
|
13
|
+
@products = @searcher.retrieve_products
|
14
|
+
@taxonomies = Spree::Taxonomy.includes(root: :children)
|
15
|
+
end
|
16
|
+
|
17
|
+
def show
|
18
|
+
@variants = @product.variants_including_master.active(current_currency).includes([:option_values, :images])
|
19
|
+
@product_properties = @product.product_properties.includes(:property)
|
20
|
+
@taxon = Spree::Taxon.find(params[:taxon_id]) if params[:taxon_id]
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
def accurate_title
|
25
|
+
if @product
|
26
|
+
@product.meta_title.blank? ? @product.name : @product.meta_title
|
27
|
+
else
|
28
|
+
super
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def load_product
|
33
|
+
if try_spree_current_user.try(:has_spree_role?, "admin")
|
34
|
+
@products = Product.with_deleted
|
35
|
+
else
|
36
|
+
@products = Product.active(current_currency)
|
37
|
+
end
|
38
|
+
@product = @products.friendly.find(params[:id])
|
39
|
+
end
|
40
|
+
|
41
|
+
def load_taxon
|
42
|
+
@taxon = Spree::Taxon.find(params[:taxon]) if params[:taxon].present?
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Spree
|
2
|
+
class StoreController < Spree::BaseController
|
3
|
+
include Spree::Core::ControllerHelpers::Order
|
4
|
+
|
5
|
+
skip_before_action :set_current_order, only: :cart_link
|
6
|
+
|
7
|
+
def unauthorized
|
8
|
+
render 'spree/shared/unauthorized', :layout => Spree::Config[:layout], :status => 401
|
9
|
+
end
|
10
|
+
|
11
|
+
def cart_link
|
12
|
+
render :partial => 'spree/shared/link_to_cart'
|
13
|
+
fresh_when(simple_current_order)
|
14
|
+
end
|
15
|
+
|
16
|
+
protected
|
17
|
+
# This method is placed here so that the CheckoutController
|
18
|
+
# and OrdersController can both reference it (or any other controller
|
19
|
+
# which needs it)
|
20
|
+
def apply_coupon_code
|
21
|
+
if params[:order] && params[:order][:coupon_code]
|
22
|
+
@order.coupon_code = params[:order][:coupon_code]
|
23
|
+
|
24
|
+
handler = PromotionHandler::Coupon.new(@order).apply
|
25
|
+
|
26
|
+
if handler.error.present?
|
27
|
+
flash.now[:error] = handler.error
|
28
|
+
respond_with(@order) { |format| format.html { render :edit } } and return
|
29
|
+
elsif handler.success
|
30
|
+
flash[:success] = handler.success
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def config_locale
|
36
|
+
Spree::Frontend::Config[:locale]
|
37
|
+
end
|
38
|
+
|
39
|
+
def lock_order
|
40
|
+
OrderMutex.with_lock!(@order) { yield }
|
41
|
+
rescue Spree::OrderMutex::LockFailed => e
|
42
|
+
flash[:error] = Spree.t(:order_mutex_error)
|
43
|
+
redirect_to spree.cart_path
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Spree
|
2
|
+
class TaxonsController < Spree::StoreController
|
3
|
+
rescue_from ActiveRecord::RecordNotFound, :with => :render_404
|
4
|
+
helper 'spree/products'
|
5
|
+
|
6
|
+
respond_to :html
|
7
|
+
|
8
|
+
def show
|
9
|
+
@taxon = Taxon.find_by_permalink!(params[:id])
|
10
|
+
return unless @taxon
|
11
|
+
|
12
|
+
@searcher = build_searcher(params.merge(taxon: @taxon.id, include_images: true))
|
13
|
+
@products = @searcher.retrieve_products
|
14
|
+
@taxonomies = Spree::Taxonomy.includes(root: :children)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def accurate_title
|
20
|
+
if @taxon
|
21
|
+
@taxon.seo_title
|
22
|
+
else
|
23
|
+
super
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<% address_id = address_type.chars.first %>
|
2
|
+
<div class="inner" data-hook=<%="#{address_type}_inner" %>>
|
3
|
+
<p class="field" id=<%="#{address_id}firstname" %>>
|
4
|
+
<%= form.label :firstname, Spree.t(:first_name) %><span class="required">*</span><br />
|
5
|
+
<%= form.text_field :firstname, :class => 'required' %>
|
6
|
+
</p>
|
7
|
+
<p class="field" id=<%="#{address_id}lastname" %>>
|
8
|
+
<%= form.label :lastname, Spree.t(:last_name) %><span class="required">*</span><br />
|
9
|
+
<%= form.text_field :lastname, :class => 'required' %>
|
10
|
+
</p>
|
11
|
+
<% if Spree::Config[:company] %>
|
12
|
+
<p class="field" id=<%="#{address_id}company" %>>
|
13
|
+
<%= form.label :company, Spree.t(:company) %><br />
|
14
|
+
<%= form.text_field :company %>
|
15
|
+
</p>
|
16
|
+
<% end %>
|
17
|
+
<p class="field" id=<%="#{address_id}address1" %>>
|
18
|
+
<%= form.label :address1, Spree.t(:street_address) %><span class="required">*</span><br />
|
19
|
+
<%= form.text_field :address1, :class => 'required' %>
|
20
|
+
</p>
|
21
|
+
<p class="field" id=<%="#{address_id}address2" %>>
|
22
|
+
<%= form.label :address2, Spree.t(:street_address_2) %><br />
|
23
|
+
<%= form.text_field :address2 %>
|
24
|
+
</p>
|
25
|
+
<p class="field" id=<%="#{address_id}city" %>>
|
26
|
+
<%= form.label :city, Spree.t(:city) %><span class="required">*</span><br />
|
27
|
+
<%= form.text_field :city, :class => 'required' %>
|
28
|
+
</p>
|
29
|
+
<p class="field" id=<%="#{address_id}country" %>>
|
30
|
+
<%= form.label :country_id, Spree.t(:country) %><span class="required">*</span><br />
|
31
|
+
<span id=<%="#{address_id}country-selection" %>>
|
32
|
+
<%= form.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'required'} %>
|
33
|
+
</span>
|
34
|
+
</p>
|
35
|
+
|
36
|
+
<% if Spree::Config[:address_requires_state] %>
|
37
|
+
<p class="field" id=<%="#{address_id}state" %>>
|
38
|
+
<% have_states = !address.country.states.empty? %>
|
39
|
+
<%= form.label :state, Spree.t(:state) %><span class='required' id=<%="#{address_id}state-required"%>>*</span><br/>
|
40
|
+
|
41
|
+
<% state_elements = [
|
42
|
+
form.collection_select(:state_id, address.country.states,
|
43
|
+
:id, :name,
|
44
|
+
{:include_blank => true},
|
45
|
+
{:class => have_states ? 'required' : 'hidden',
|
46
|
+
:disabled => !have_states}) +
|
47
|
+
form.text_field(:state_name,
|
48
|
+
:class => !have_states ? 'required' : 'hidden',
|
49
|
+
:disabled => have_states)
|
50
|
+
].join.gsub('"', "'").gsub("\n", "")
|
51
|
+
%>
|
52
|
+
<%= javascript_tag do -%>
|
53
|
+
$('#<%="#{address_id}state" %>').append("<%== state_elements %>");
|
54
|
+
<% end %>
|
55
|
+
</p>
|
56
|
+
<noscript>
|
57
|
+
<%= form.text_field :state_name, :class => 'required' %>
|
58
|
+
</noscript>
|
59
|
+
<% end %>
|
60
|
+
|
61
|
+
<p class="field" id=<%="#{address_id}zipcode" %>>
|
62
|
+
<%= form.label :zipcode, Spree.t(:zip) %><% if address.require_zipcode? %><span class="required">*</span><br /><% end %>
|
63
|
+
<%= form.text_field :zipcode, :class => "#{'required' if address.require_zipcode?}" %>
|
64
|
+
</p>
|
65
|
+
<p class="field" id=<%="#{address_id}phone" %>>
|
66
|
+
<%= form.label :phone, Spree.t(:phone) %><% if address.require_phone? %><span class="required">*</span><br /><% end %>
|
67
|
+
<%= form.phone_field :phone, :class => "#{'required' if address.require_phone?}" %>
|
68
|
+
</p>
|
69
|
+
<% if Spree::Config[:alternative_shipping_phone] %>
|
70
|
+
<p class="field" id=<%="#{address_id}altphone" %>>
|
71
|
+
<%= form.label :alternative_phone, Spree.t(:alternative_phone) %><br />
|
72
|
+
<%= form.phone_field :alternative_phone %>
|
73
|
+
</p>
|
74
|
+
<% end %>
|
75
|
+
</div>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<div class="columns alpha six" data-hook="billing_fieldset_wrapper">
|
2
|
+
<fieldset id="billing" data-hook>
|
3
|
+
<%= form.fields_for :bill_address do |bill_form| %>
|
4
|
+
<legend align="center"><%= Spree.t(:billing_address) %></legend>
|
5
|
+
<%= render :partial => 'spree/address/form', :locals => { :form => bill_form, :address_type => 'billing', :address => @order.bill_address } %>
|
6
|
+
<% end %>
|
7
|
+
</fieldset>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div class="columns omega six" data-hook="shipping_fieldset_wrapper">
|
11
|
+
<fieldset id="shipping" data-hook>
|
12
|
+
<%= form.fields_for :ship_address do |ship_form| %>
|
13
|
+
<legend align="center"><%= Spree.t(:shipping_address) %></legend>
|
14
|
+
<p class="field checkbox" data-hook="use_billing">
|
15
|
+
<%= check_box_tag 'order[use_billing]', '1', @order.shipping_eq_billing_address? %>
|
16
|
+
<%= label_tag :order_use_billing, Spree.t(:use_billing_address), :id => 'use_billing' %>
|
17
|
+
</p>
|
18
|
+
<%= render :partial => 'spree/address/form', :locals => { :form => ship_form, :address_type => 'shipping', :address => @order.ship_address } %>
|
19
|
+
<% end %>
|
20
|
+
</fieldset>
|
21
|
+
</div>
|
22
|
+
<hr class="clear" />
|
23
|
+
|
24
|
+
<div class="form-buttons" data-hook="buttons">
|
25
|
+
<%= submit_tag Spree.t(:save_and_continue), :class => 'continue button primary' %>
|
26
|
+
<% if try_spree_current_user %>
|
27
|
+
<span data-hook="save_user_address">
|
28
|
+
|
29
|
+
<%= check_box_tag 'save_user_address', '1', try_spree_current_user.respond_to?(:persist_order_address) %>
|
30
|
+
<%= label_tag :save_user_address, Spree.t(:save_my_address) %>
|
31
|
+
</span>
|
32
|
+
<% end %>
|
33
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<fieldset id="order_details" data-hook>
|
2
|
+
<div class="clear"></div>
|
3
|
+
<legend align="center"><%= Spree.t(:confirm) %></legend>
|
4
|
+
<%= render :partial => 'spree/shared/order_details', :locals => { :order => @order } %>
|
5
|
+
</fieldset>
|
6
|
+
|
7
|
+
<br />
|
8
|
+
|
9
|
+
<div class="form-buttons" data-hook="buttons">
|
10
|
+
<%= submit_tag Spree.t(:place_order), :class => 'continue button primary' %>
|
11
|
+
<script>Spree.disableSaveOnClick();</script>
|
12
|
+
</div>
|