Hi,
Please help...
I have VM 3.0.2 on Joomla 3.3.6 and I have added a custom field type related products with these settings:
http://imtp.me/8yxw02lj3
but when I save it, I get a lot of warnings most of them look like (only lines differ):
Warning: SimpleXMLElement::xpath() [simplexmlelement.xpath]: Unfinished literal in ../libraries/joomla/form/form.php on line 1545
Warning: SimpleXMLElement::xpath() [simplexmlelement.xpath]: xmlXPathEval: evaluation failed in ../libraries/joomla/form/form.php on line 1545
The custom field is saved but when I go to product and want to select it, it is not available in the custom fields selection...
Please advise what is wrong...the complete screenshot with warnings is attached...
warnings at least reported fixed on 3.0.3 - 3.0.4 already out -- updates are for a reason......
Hi,
Thank you. I made the update, but still I cannot see the custom field in the product settings even though it is in the list of custom fields. I deleted it and added it again in the new version, but no change...when I open the custom field again, I get little more settings, so I save it again and still no change...
is there something wrong in its settings?
http://imtp.me/8yym02lj3.p
does it need a layout position? has your template custom field positions?
I don't think so, because other custom fields do not have any layout position in their custom field settings and they do show up in product settings and in front end...
This is valid for normal fields. They have a fallback.
But the customfield related products needs a position. The "default" position for the normal layout is "related_products".
Thanks, Milbo, but it did not work, so I contacted the template provider
I managed to assign the related product in back-end, but they do not show in front-end.,here is an example:
http://www.responsive.vintagelab15.com/webshop/zitten/eetkamerstoelen/design-stoel-caprice-tube-groen
here is the screenshot from the back-end: http://imtp.me/8z1o02lj3
but has your template a rel prod position?
echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_products','class'=> 'product-related-products','customTitle' => true ));
No, it was missing but I used your code and pasted it to templates/eshop/html/com_virtuemart/productdetails/default.php like this and now it works!
Perfect, thank you very much!
I cannot see the related products too.
In my template related products are shown by this code in com_virtuemart/productdetails/default.php
if (!empty($this->product->customfieldsRelatedProducts)) {
echo $this->loadTemplate('relatedproducts');
}
and the com_virtuemart/productdetails/default_relatedproducts.php is
<?php
foreach ($this->product->customfieldsRelatedProducts as $field) {
?><div class="product-field product-field-type-<?php echo $field->field_type ?>">
<span class="product-field-display"><?php echo $field->display ?></span>
</div>
<?php } ?>
I've tested some changes in the code and in my opinion the problem is
$this->product->customfieldsRelatedProducts
that isn't set (or something like this: I'm not a developer!)
if u are on VM3 then
if (!empty($this->product->customfieldsRelatedProducts)) {
echo $this->loadTemplate('relatedproducts');
}
is simply wrong - that is VM2 code - there is no default_relatedproducts.php in VM3
use
echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_products','class'=> 'product-related-products','customTitle' => true ));
Thanks! I feared it would be.
Now I can see the related products but under every name there is the same sentence: (italian language) "Prototipo personalizzato per i prodotti correlati"
Can I hide ii'
Thanks
by css if u can target it
empty lang constant if a lang constant
I'm using the below code for related products in my [custom] template, but somehow it's not working for me. Any clues?
I have created a nice tabbed product page with CSS & jQuery, but I'm kinda stuck here... :(
<div id="vmptab5" class="vmptab">
<?php
echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_products','class'=> 'product-related-products','customTitle' => true ));
?>
</div>
Hello, friends.
Can somebody tell why custom field of "related product" type cann't be assigned in product card? I created such custom filed but it even cann't be seen in product card among the list of all available custom fileds
VM 3.0.9
Quote from: borro on July 31, 2015, 13:20:51 PM
Hello, friends.
Can somebody tell why custom field of "related product" type cann't be assigned in product card? I created such custom filed but it even cann't be seen in product card among the list of all available custom fileds
VM 3.0.9
I have got the same question. Can someone please point us in the correct direction?
Kind regards,
Meton
You have to assign the right position : onbot for bottom, here:
http://imtp.me/9wb402lj3.p
other positions are :ontop, normal a addtocart.
http://www.stawebnice.com/virtuemart-3-souvisejici-produkty
in case the position is not defined in your template, you need to enter it by this tutorial:
http://www.stawebnice.com/virtuemart-3-nezobrazuje-se-souvisejici-zbozi (use translate.google.com)
Quote from: stawebnice on August 06, 2015, 17:47:22 PM
You have to assign the right position : onbot for bottom, here:
http://imtp.me/9wb402lj3.p
other positions are :ontop, normal a addtocart.
http://www.stawebnice.com/virtuemart-3-souvisejici-produkty
in case the position is not defined in your template, you need to enter it by this tutorial:
http://www.stawebnice.com/virtuemart-3-nezobrazuje-se-souvisejici-zbozi (use translate.google.com)
The normal related products work as designed. What doesnt work is that i created a Custom field called "compatible products" I want to assign this to a specific position in my template. But the custom field (compatible products) is not avaiable in the dropdown field @ the custom fields tab of a product.
Kind regards,
Meton