Hello,
I am trying to edit my html file (which uses Ruby) to change the format
into a table. The default layout is a top-down view. Ruby is
completely new to me although I have been using HTML for around 6 years.
I want it displayed in a table (where I can also add a background and
styling). I have tried all sorts of methods but I can not get it to work
(the page displays an internal error with no explanation)
From what the advice says in the file, this should work (but doesn’t);
<%= product.name.html %><%= product.description %> <%# Other parts go here %> |
<% end %>
Where the following code is “<%# Other parts go here %>”;
<%=
billing.currency_symbol.html %><%= billing.price(product.unit_price,
:use_tax_prefs) %>
<% if product.base_renewal_period != 'never' %>
every <%= product.unit_period.to_s_short.html %>
<% end %>
<% if product.setup_fee != 0 %>
plus a one off fee of <%= billing.currency_symbol.html %><%=
sprintf("%.2f", if billing.include_tax? then
billing.price(product.setup_fee) else product.setup_fee end) %>
<% end %>
<% if product.has_free_products? %>
includes free domain* or transfer**
<% end %>
I have been searching the internet for a few days and have discovered
that in some of these templates, there is a spare <% end %> which I have
even tried removing/playing with.
Currently this displays six different web hosting package top-down. I
want them in a table, and, preferably, in order such as…
Basic 1 Advanced 1 Pro 1
info info info
buy buy buy
Basic 2 Advanced 2 Pro 2
info info info
buy buy buy
The page is working currently using;
<% i = 0 %>
<% hosting_products.each do | product | %>
<%= product.name.html %>
<%= product.description %>
<%=
billing.currency_symbol.html %><%= billing.price(product.unit_price,
:use_tax_prefs) %>
<% if product.base_renewal_period != 'never' %>
every <%= product.unit_period.to_s_short.html %>
<% end %>
<% if product.setup_fee != 0 %>
plus a one off fee of <%= billing.currency_symbol.html %><%=
sprintf("%.2f", if billing.include_tax? then
billing.price(product.setup_fee) else product.setup_fee end) %>
<% end %>
<% if product.has_free_products? %>
includes free domain* or transfer**
<% end %>
No thank you, please continue with my order ....
<% end %> <% if not billing.tax_applies? %> <% elsif billing.include_tax? %>* Includes <%= billing.tax_name %>
<% else %>* Excluding <%= billing.tax_name %>
<% end %>Thanks for reading. I really hope somebody can point me in the right
direction