Magento Forum - UK Magento Forum (Unofficial)

An unofficial but dedicated Magento Forum for Magento Users, Designers and Developers

Product coding issues

A forum for web designers working with the Magento system.

Product coding issues

Postby Clodbuster » Wed Jul 13, 2011 7:08 am

I wonder if you could explain the reason why Magento seems to require all coding to follow on the same line and not follow normal rules to make it more viable. As an example I've copied below two codes, both give the correct result according to Dreamweaver and the WYSIWYG function but when the code is copied into Magento it throws up a totally different view. These are two products on a temporary build website.

This Page EquiStop M1 ( http://mag.agrisellex.co.uk/electric-fe ... op-m1.html ) shows an extra line between bullet points and a big gap between the end of text and the table - looks terrible. Note the coding is easy to follow and logical, as it should be.

"<h1 style="text-align: center;">A Popular Electric Fencing energiser for smaller Equestrian requirements</h1>
<ul>
<li>A lower energy mains unit for energising medium yards and Equestrian fencing.</li>
<li>Mains units are stronger and cheaper per unit of energy to run, no battery concerns and may be placed a considerable distance from the fence and connected by a single wire. They do not have to be adjacent to the fence.</li>
<li>The unit draws just 2 Watts - far less than a 40Watt light bulb.</li>
<li>A 1m earth stake and Insulated cable is required.</li>
</ul>
<table border="1" width="360">
<tbody>
<tr>
<td width="150">Stored Energy; 1 Joule</td>
<td width="150">Output Energy; 0.8 Joule.</td>
</tr>
<tr>
<td>Max Voltage; 8500v</td>
<td>Volts at 500 Ohm; 5500v</td>
</tr>
<tr>
<td>Max fence length; 25klm</td>
<td>Realistic length; 12klm</td>
</tr>
<tr>
<td>Will run 5nets</td>
<td>Power Consumption; 2 Watts</td>
</tr>
</tbody>
</table>"


(Please see the second posting for the continuation of this query, We are only allowed one URL so I'm unable to present the second example in the same posting)
Clodbuster
 
Posts: 9
Joined: Fri Jun 24, 2011 2:21 pm

Re: Product coding issues

Postby Clodbuster » Wed Jul 13, 2011 7:08 am

To contrast this ;-

This Page Equistop Tapes,( http://mag.agrisellex.co.uk/tape-twine- ... -tape.html ) I found I had to bring all the code onto the same line to achieve a logical website presentation. The huge gap to the table has now disappeared but the coding below is hard to follow. The interesting thing is if you take this through to the WYSIWYG editor to edit it - it automatically separates the code in the manner above. To get the correct look I have to go in AGAIN and remove all the spaces and rows seen above.

"<h1>A Popular Choice of an Electric Fencing Tape in Europe</h1><ul><li>The thick, Polyplastic monofilaments at the edge of the tape provide greater stability than any other tape and allows it to accept higher tension levels than other tapes. </li><li>Available in either White or Brown</li><li>This tape looks attractive and fulfils the purpose of a secure perimeter fence. No wonder it is a popular tape in Europe.</li><li>The Stainless steel conductors are 0.28mm thick and ensure excellent conductivity&nbsp;as well as a high breaking strength. </li><li>5 Year warranty* against UV degradation&nbsp;for your protection.</li><li>Supplied as either&nbsp;a 20mm&nbsp;or&nbsp;40mm tape in 200 meter reels.</li></ul><table border="1" width="432"><tbody><tr><td width="150">Conductivity</td><td width="275">20mm = 1.7Ohms/m, 40mm = 1.3 Ohms/m</td></tr><tr><td>Number of Conductors</td><td width="208">20mm = 4, 40mm = 8</td></tr><tr><td>Breaking Strain</td><td width="208">20mm = 180 Kgs, 40mm = 250 Kgs</td></tr></tbody></table>
*The warranty offered on all the above tapes is limited to the Ultra Violet degradation of the plastic material and does not cover mechanical damage by wind action, animal action, abrasion or damage by lightning strike. "


Am I perhaps doing something wrong? I cannot see this being the normal method being used by experts such as yourselves who have to do many pages.
Clodbuster
 
Posts: 9
Joined: Fri Jun 24, 2011 2:21 pm

Re: Product coding issues

Postby edmondscommerce » Wed Jul 13, 2011 3:51 pm

Its auto converting line breaks to html line breaks.

That's a feature for most people.

You shouldn't really be pasting complex html into the description, you should be editing the templates instead
User avatar
edmondscommerce
 
Posts: 1157
Joined: Fri Sep 11, 2009 8:55 am
Location: UK

Re: Product coding issues

Postby Clodbuster » Thu Jul 14, 2011 6:58 am

Thanks for responding. The template has been altered to bring the description to the lie across the top below the price and image also remove the short description - are you suggesting I have a template for each product?

Even when the text is written in the WYSIWYG function and submitted I am getting the same result.
Clodbuster
 
Posts: 9
Joined: Fri Jun 24, 2011 2:21 pm

Re: Product coding issues

Postby edmondscommerce » Thu Jul 14, 2011 10:33 pm

it seems to me you are putting product attributes as hard coded HTML

basically the description is only really mean to be prose with simple html

you can do it your way if you want but would have to edit the template output to stop it running it through nl2br

I think you should get complex HTML into the template though and put product info into attributes
User avatar
edmondscommerce
 
Posts: 1157
Joined: Fri Sep 11, 2009 8:55 am
Location: UK

Re: Product coding issues

Postby Clodbuster » Fri Jul 15, 2011 7:12 am

Thank you, this is my first attempt at Magento having had to find another provider as my previuos has gone into liquidation.

I would not have considered simple bullet points to be "complex". It is standard copywriting practice used in many product descriptions.
As the description field has a WYSIWYG build function incorporated into it, I would expect it to support what is offered on it.
Clodbuster
 
Posts: 9
Joined: Fri Jun 24, 2011 2:21 pm


Return to Magento Designers

cron