So I did understood what's the problem. I have to open "underlying" spree
app and write paths to files in "virtual_path" attr. Seems like there is no
way to deface such thing:
<p class="field" id=<%="#{address_id}address2" %>>
<%= form.label :address2, t(:street_address_2) %><br />
<%= form.text_field :address2 %>
</p>
because id=<%="#{address_id}address2" %> is dynamic?

суббота, 19 января 2013 г., 15:04:00 UTC+4 пользователь Serega Sheypak
написал:
Hi. Sorry, can't understand how to use Deface.
I have an url: http://localhost:8080/spree/checkout As I understood It's
so called "virtual path"?.
These path has several steps, I want to change the first one: "Address"

There are fields I want to change or put away:
1. I want to put away 2nd address
2. I want hide "Country" field and set default value to my country
("Albania" for example)
3. I want to hide and set default value to "post code"

If I want to do so, what do I have to do?

I've tried to start from the simple example
app/overrides/checkout_address.rb

Deface::Override.new(:virtual_path => "spree/checkout",
:insert_before => "p#baddress2",
:text => "TEST insert_before",
:name => "checkout_address"
)

This override instantiation is really compiled. I've forgot to set :nameattr and got an error. I've added
:name attr and error disappeared.
I did come back to spree/checkout page and don't see TEST insert_before
text

What do I do wrong?
--

Search Discussions

  • Michael Sevestre at Jan 19, 2013 at 1:26 pm
    What do you want to do exactly?
    On Sat, Jan 19, 2013 at 8:00 AM, Serega Sheypak wrote:

    So I did understood what's the problem. I have to open "underlying" spree
    app and write paths to files in "virtual_path" attr. Seems like there is no
    way to deface such thing:
    <p class="field" id=<%="#{address_id}address2" %>>
    <%= form.label :address2, t(:street_address_2) %><br />
    <%= form.text_field :address2 %>
    </p>
    because id=<%="#{address_id}address2" %> is dynamic?


    суббота, 19 января 2013 г., 15:04:00 UTC+4 пользователь Serega Sheypak
    написал:
    Hi. Sorry, can't understand how to use Deface.
    I have an url: http://localhost:8080/**spree/checkout<http://localhost:8080/spree/checkout> As
    I understood It's so called "virtual path"?.
    These path has several steps, I want to change the first one: "Address"

    There are fields I want to change or put away:
    1. I want to put away 2nd address
    2. I want hide "Country" field and set default value to my country
    ("Albania" for example)
    3. I want to hide and set default value to "post code"

    If I want to do so, what do I have to do?

    I've tried to start from the simple example
    app/overrides/checkout_**address.rb

    Deface::Override.new(:virtual_**path => "spree/checkout",
    :insert_before => "p#baddress2",
    :text => "TEST insert_before",
    :name => "checkout_address"
    )

    This override instantiation is really compiled. I've forgot to set :nameattr and got an error. I've added
    :name attr and error disappeared.
    I did come back to spree/checkout page and don't see TEST insert_before
    text

    What do I do wrong?
    --

    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedJan 19, '13 at 1:00p
activeJan 19, '13 at 1:26p
posts2
users2
websitespreecommerce.com
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase