Post by ratmix » Tue Nov 25, 2014 3:35 pm

Salut,

Vreau ca pretul sa apara ca in imagine [img]pret.jpg[/img], cu zecimalele sus. Stie cineva cum pot face asta?

Multumesc pentru ajutor,
Marius

Attachments

pret.jpg

pret.jpg (5.69 KiB) Viewed 760 times


Newbie

Posts

Joined
Sat Jan 05, 2013 5:51 pm

Post by zighia » Tue Nov 25, 2014 5:30 pm

folosesti tagul <sup>

New member

Posts

Joined
Tue Jun 17, 2014 2:39 am

Post by atufa » Tue Nov 25, 2014 5:31 pm

Folosesti tag-ul html superscript:
http://www.tizag.com/htmlT/htmlsuperscript.php

Image Image


User avatar
Active Member

Posts

Joined
Fri Jul 27, 2012 2:31 pm


Post by ratmix » Tue Nov 25, 2014 9:13 pm

Multumesc pentru ajutor. Am sa incerc.

Newbie

Posts

Joined
Sat Jan 05, 2013 5:51 pm

Post by ratmix » Wed Nov 26, 2014 5:34 am

Poate totusi imi spune cineva unde trebuie facuta modificarea, o linie de comanda, ceva

Newbie

Posts

Joined
Sat Jan 05, 2013 5:51 pm

Post by opencartromania » Wed Nov 26, 2014 3:17 pm

Buna ziua!

Este corect ce spunea atufa mai sus... asa poate fi facuta acea afisare... in continuare, o simpla solutie, folosind functia explode:

(Varianta avansata: se poate modifica libraria currency, unde poate fi adaugat tag-ul sup)

Code: Select all

$pret  = "123,34";
$split = explode(",", $pret);
echo $split[0] . '<sup> '.$split[1].'</sup>';
Rezultat:

Image

Si exemplu concret: catalog\view\theme\default\template\product/product.tpl

Linia ~ 37 ptr. pret:

Code: Select all

<?php //echo $price; ?>
<?php $split = explode(".", $price); echo $split[0]. '<sup> '.$split[1].'</sup>'; ?>
Linia ~ 44 pentru taxa:

Code: Select all

<span class="price-tax"><?php echo $text_tax; ?> <?php //echo $tax; ?><?php $split = explode(".", $tax); echo $split[0]. '<sup> '.$split[1].'</sup>'; ?> </span><br />
Va rezulta:
Image
subirimagenes

Acest cod poate fi aplicat in toate view-urile unde exista pret sau simplificand problema, creat un vqmod pentru asta...

Succes!

User avatar
Active Member

Posts

Joined
Wed Sep 25, 2013 9:26 pm


Post by nooblike » Sun Dec 14, 2014 8:04 pm

Vad ca si moneda "Lei" s-a adaugat in tag-ul superscript

Newbie

Posts

Joined
Mon Jun 16, 2014 9:21 pm

Post by opencartromania » Mon Dec 15, 2014 4:20 pm

Buna ziua!

Da este cuprinsa si moneda in tag-ul sub.

Aceasta era varianta light, (insa si aici se poate, cu un mic artificiu rezolva problema), varianta modificarii in libraria currency poate rezolva aceasta problema.

A fost prezentata o varianta simpla de rezolvare a problemei, ptr. lucruri mai avansate, va stam la dispozitie.

Cele bune,

User avatar
Active Member

Posts

Joined
Wed Sep 25, 2013 9:26 pm

Who is online

Users browsing this forum: No registered users and 10 guests