VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Cro on March 09, 2016, 16:24:24 PM

Title: Custom fields in Product preview
Post by: Cro on March 09, 2016, 16:24:24 PM
Hi,

I show my products in a product popup window. But the custom fields I have are not displayed here.

How can I tell the file to show the custom fields?

I am using VirtueMart 3.0.12 and Joomla! 3.4.8


Thanks in advance for any help!

cro
Title: Re: Custom fields in Product preview
Post by: jenkinhill on March 09, 2016, 16:46:57 PM
Quote from: Cro on March 09, 2016, 16:24:24 PM

How can I tell the file to show the custom fields?


Shout at it?

If you are using the default productdetails templates then they should display, but I guess you are using overrides? With no URL I have to guess. Compare your templates with the default VM templates to see wht is missing.
Title: Re: Custom fields in Product preview
Post by: Cro on March 09, 2016, 17:09:56 PM
Hahaha,

i was trying to shout but nothing happend  ;D So i hope you will help me out ...

URL: http://aks-agentur.com/tickets/index.php/test


Thanks in advance
Title: Re: Custom fields in Product preview
Post by: jenkinhill on March 09, 2016, 17:55:58 PM
That template is suffering from css and JavaScript overload but somehow it seems to work!  As it is a commercial template using their own overrides we can have no way of knowing what file & code changes they have made, so you should contact http://joomlavi.com. 

Or maybe add to this thread:  http://joomlavi.com/forum/forum/jv-capitol/4354-virtuemart-|-product-details-page-view-in-popup-instead-of-product-details-page

http://forum.virtuemart.net/index.php?topic=108212.0
Title: Re: Custom fields in Product preview
Post by: Cro on March 09, 2016, 19:04:36 PM
ok thanks,

This code made the custom fields show up in the popup.

<?php $custom_title = null;
if (!empty($product->customfields)) {
foreach ($product->customfields as $field) {
if ($field->is_hidden ) //OSP http://forum.virtuemart.net/index.php?topic=99320.0
continue;
if ($field->display) { ?>
<span class="product-field-display"><?php echo $field->display ?></span>
<?php } ?> <?php } ?> <?php }  ?>


But untfortunately it doesnt add the amount on the basic price. Do you know why?
Title: Re: Custom fields in Product preview
Post by: GJC Web Design on March 09, 2016, 22:53:56 PM
QuoteBut untfortunately it doesnt add the amount on the basic price. Do you know why?

your trying to run JS code in a popup...  but is the JS (vmprices.js) even loaded into I assume an ajax called page?
it is probably the reason they never tried to show custom fields in the first place