News:

Support the VirtueMart project and become a member

Main Menu

VM3 Related products show images and title

Started by malik0206, December 19, 2014, 19:28:39 PM

Previous topic - Next topic

malik0206

Hi

I have added lots of related products for one of the item and when i view the item it just shows links to related products this is very bad.

It should show image, title and price or even add to cart option but it can't seem to find the option also looked in to default_relatedproducts.php it just bring in links

So how can i show the related products image, title

Thanks

malik0206

Ok i have done more digging around and found the related item in custom fields where i can select image and price but i see these error message what do they mean


Warning: SimpleXMLElement::xpath(): Unfinished literal in /var/www/vhosts/mydomain.com/httpdocs/libraries/joomla/form/form.php on line 1545 Warning: SimpleXMLElement::xpath(): xmlXPathEval: evaluation failed in /var/www/vhosts/mydomain.com/httpdocs/libraries/joomla/form/form.php on line 1545 Warning: SimpleXMLElement::xpath(): Unfinished literal in /var/www/vhosts/mydomain.com/httpdocs/libraries/joomla/form/form.php on line 1545 Warning: SimpleXMLElement::xpath(): xmlXPathEval: evaluation failed in /var/www/vhosts/mydomain.com/httpdocs/libraries/joomla/form/form.php on line 1545 Warning: SimpleXMLElement::xpath(): Unfinished literal in



reinhold

Thank you for that report. In fact, we have already found and fixed the issue, but not yet released a new version that contains the fix.
Please notice that this is "just" a php warning, so the functionality is not impaired at all.

Best regards,
Reinhold

malik0206

Hi

Thanks for the letting me know regarding the error message, you are right it doesn't affect the functions of related products however i do have one small question regarding how you published the data

<div class="product-field product-field-type-R">
<span class="product-field-display"><a target="_self" title="Cross Base" href="/flying-flags/flags-accessories/cross-base.html"><img alt="cross base_016" src="/images/eStore/product/resized/cross base_016_500x500.jpg"> Cross Base</a></span>
</div>

How come you guys didn't put a <span> around the product title which makes it very difficult to style the title as i'm trying to put a background around the title but no class on the title

Can you please tell me how i can put a class on the title so it can be styled as per my design layout.


Thanks

jenkinhill

On what page is that? If you need a span you can add it yourself into the template file and create an override.
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

malik0206

Hi

the file located in sublayouts for related items this the code

<?php defined('_JEXEC') or die('Restricted access');

$related = $viewData['related'];
$customfield = $viewData['customfield'];
$thumb = $viewData['thumb'];


//juri::root() For whatever reason, we used this here, maybe it was for the mails
echo JHtml::link (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $related->virtuemart_product_id . '&virtuemart_category_id=' . $related->virtuemart_category_id), $thumb   . $related->product_name, array('title' => $related->product_name,'target'=>'_self'));
if($customfield->wPrice){
   $currency = calculationHelper::getInstance()->_currencyDisplay;
   echo $currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $related->prices);
}
if($customfield->wDescr){
   echo '<p class="product_s_desc">'.$related->product_s_desc.'</p>';
}


also in product details there is a file default_relatedproducts.php any changes i make in this file does not affect the layout it seems VM3 is not loading this file so i'm bit confused as to where its getting the information form.

please advise thanks


muhad

Hi,
I have similar problem when I save new 'product user field'.
Page start abouts hundret lines like:
Warning: SimpleXMLElement::xpath(): Unfinished literal in C:\xampp\htdocs\beck-orto2\libraries\joomla\form\form.php on line 1545
Warning: SimpleXMLElement::xpath(): xmlXPathEval: evaluation failed in C:\xampp\htdocs\beck-orto2\libraries\joomla\form\form.php on line 1545
Some time line number change to: 1709

Isn't the same problem?
Where should I notify that?

GJC Web Design

There as been no release since this was fixed - so fix I assume will be in VM3.0.3 to be out shortly
in the meantime just turn down your reporting
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation