haven't had much trouble customizing the spree app for clean integration
into the site's interface, but there are a few little finicky details that
have me stumped. I'd really appreciate the help, even if these questions
sound basic, as I just can't seem to correctly modify the code.
Under orders>edit.html.erb<https://github.com/spree/spree/blob/master/frontend/app/views/spree/orders/edit.html.erb>,
I need to make the following button code work as a text link (instead of a
button):
<%= button_tag :class => 'primary', :id => 'update-button' do %>
<%= t(:update) %>
<% end %>
To help visualize, let's say this is the HTML I'm trying to use:
<a href="#">Update</a>
--
I need this code to become a text link, along with an accompanying image/icon:
<%= button_tag :class => 'button checkout primary', :id => 'checkout-link', :name => 'checkout' do %>
<%= t(:checkout) %>
<% end %>
This is an example of the markup:
<a href="link">Checkout <img src="image.png" /></a>
--
Under orders>_line_item.html.erb <https://github.com/spree/spree/blob/master/frontend/app/views/spree/orders/_line_item.html.erb>, I need a link_to image to become a button:
<%= link_to image_tag('icons/delete.png'), '#', :class => 'delete', :id => "delete_#{dom_id(line_item)}" %>
Another markup sample, in case I didn't explain well:
<button>Remove from Cart</button>
--
And finally, another button to become a text link+image on the products>_cart_form.html.erb <https://github.com/spree/spree/blob/master/frontend/app/views/spree/products/_cart_form.html.erb>.
<%= button_tag :class => 'large primary', :id => 'add-to-cart-button', :type => :submit do %>
<%= t(:add_to_cart) %>
<% end %>
Markup:
<a href="link">Add to Cart <img src="image.png" /></a>
By seeing the way these convert, you guys can really help me understand Rails syntax
and aid me in accomplishing some pretty monumental tasks in Spree. Thanks!
--
You received this message because you are subscribed to the Google Groups "Spree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.