i able insert text after <div>
using deface::override
want add image of qr code instead of text. how change code work image? original code added text first block, , second 1 try add image second. thank much!
here first 1 work:
deface::override.new(:virtual_path => "spree/home/index", :replace => "[data-hook='homepage_products']", :name => "homepage_contents", :text => "la registration, c'est le futur!")
and here's second doesn't work:
deface::override.new(:virtual_path => "spree/checkout/_address", :insert_after => "[data-hook = 'shipping_fieldset_wrapper']", :name => "add_qr_code", :text => image_tag("assets/images/qr_code.png"))
i believe need supply erb tags <%= ... %>
work or it'll add raw html.
try:
deface::override.new(:virtual_path => "spree/checkout/_address", :insert_after => "[data-hook = 'shipping_fieldset_wrapper']", :name => "add_qr_code", :text => "<%= image_tag('assets/images/qr_code.png') %>")
https://github.com/spree/deface examples