News:

Looking for documentation? Take a look on our wiki

Main Menu

How to echo the price and ID value of related products on Product Details page

Started by Genius WebDesign, July 16, 2012, 22:03:34 PM

Previous topic - Next topic

csho

Quote from: fabelmik on September 01, 2012, 02:33:44 AM
Hi,

After this code:
echo jText::_($field->custom_field_desc);
$product = $model->getProductSingle($field->custom_value,false);
$price = $calculator -> getProductPrices($product);


You should try to add this:
echo $product->images[0]->displayMediaFull('class="product-image"',false,"class='modal'",true);

So instead of:
$this->product->images[0]->displayMediaFull(......

You should use:
$product->images[0]->displayMediaFull(......

I havent been able to test this yet, but it should work.

Didn't worked on my case, it got bugged and removed all the css-like styles in my page.
It usually seems that is because of an php error.
Any other guess?

illusiondrmr

Just popped in to say thanks to Genius WebDesign for the solution in page 1 !!

camble

Quote from: csho on May 15, 2014, 13:50:05 PM
Quote from: fabelmik on September 01, 2012, 02:33:44 AM
Hi,

After this code:
echo jText::_($field->custom_field_desc);
$product = $model->getProductSingle($field->custom_value,false);
$price = $calculator -> getProductPrices($product);


You should try to add this:
echo $product->images[0]->displayMediaFull('class="product-image"',false,"class='modal'",true);

So instead of:
$this->product->images[0]->displayMediaFull(......

You should use:
$product->images[0]->displayMediaFull(......

I havent been able to test this yet, but it should work.

Didn't worked on my case, it got bugged and removed all the css-like styles in my page.
It usually seems that is because of an php error.
Any other guess?

I've managed to customise my Related Products in VM 2.6.6, however I just want to be able to pull through the main image for each product.

I tried the code (above) and it doesn't work, so do you have any ideas?


Kind regards
Liam