News:

Looking for documentation? Take a look on our wiki

Main Menu

How to: add <p>, <br /> <font > in Prodcut name

Started by julianmx, August 24, 2013, 00:17:43 AM

Previous topic - Next topic

julianmx

II have tried but when I save, it deletes the entire html code or tags that I have included
thank you very much!

jenkinhill

Please be more specific. Product name where? In a module, category page, product details?  And why a <font> tage - you should be using css to control fonts and to add spacing.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

julianmx

hi thanks for reply, I need, in this part separates the code (numbers), from the  product name my client wants all codes in a second row o, can we do this,
thanks!



[attachment cleanup by admin]

jenkinhill

That numerical part is the SKU. Dont include the number in the product name, just display the SKU immediately below the name. Looks like you are already using an override template for the category display so the template for you to edit will be in [your-joomla-template]/html/com_virtuemart/category/

For the default VM category template, default.php in version 2.0.22b the following code change adds the SKU immediately beow the product name.

Find this code (around line 285)

<h2><?php echo JHTML::link ($product->link$product->product_name); ?></h2>


replace with


<h2><?php echo JHTML::link ($product->link$product->product_name); ?> <br /> <?php echo JHTML::link ($product->link$product->product_sku?></h2>


The code in youe template file may be slightly different to this, but the same principle applies.

You can make a similar change to the product details template.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

julianmx

many thanks for the tip, helped me to work around my problema!

but beyond that I seek to put a <BR/> this because I'm trying to get the pictures be aligned , and the box stay with the same height, and if I put the <BR/>I'll force that the photos are alienated

jenkinhill

You could use phpMyAdmin to edit the product name directly inh the database. The added code may well break product search, though.

Alignments should be managed using css.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Maxim Pishnyak

Could you explain me is it still necessary for you to have <br /> at this stage?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart