News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

how to Display custom fields titles and custom field values on Cart template

Started by earlybird, August 14, 2013, 13:04:19 PM

Previous topic - Next topic

earlybird

Hello there,
I want to display customfieldsvalues and customfieldtitles on the cart temlate.

at the moment i dispay only one string with all customfield values and titles,
they look like :
"<span>color:red</span><br><span>material:wood</span><br>..."
but i want to display them like
"<span class="title">color:</span><span class="value">red</span>"

but I don't know how to get them seperatly.
at the moment i use
foreach ($this->cart->products as $pkey => $prow) {
echo $prow->customfields;
}


Has somebody a hint for me ???

Maxim Pishnyak

echo $prow->customfields;
You could search <br /> in customfields.php
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

earlybird

Thanks!,
i found the <br />  in the model customfields.php
but isn't there a way to get those title/values
as an Object or an array?

so i could process them in the cart template

Maxim Pishnyak

Why you don't like 'kill <br />' method?

As for 'Object or an array?' I'm not sure there could be a post about this on forum. You could try to search.
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

earlybird

Cause this means I have to change a core file.
and on the next update it's gone.
or am I wrong ?

Maxim Pishnyak

You're right. You could program a plugin and don't hack a core.
Quote from: Maxim Pishnyak on August 16, 2013, 20:32:13 PM
As for 'Object or an array?' I'm not sure there could be a post about this on forum. You could try to search.
You didn't try to search?
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

earlybird

I tried now to search for this but may be I've the wrong search terms but
i didn't found it
do you may be have a link ?