PSD TO Joomla Templates Conversion - Joomla Expert

Joomla website Development - Joomla Solutions

Joomla Services and Joomla Tutorials

Joomla Services development and Tutorials - virginsoft
 

joomla services

You are here: Home Tutorials Add product image to VirtueMart cart page

Add product image to VirtueMart cart page

SHARE :
Digg
http%3A%2F%2Fvirginsoft.net%2Fjoomla-tutorials%2Fadd-product-image-to-virtuemart-cart-page.html
 
Edit 4 files to show product thumbnails in shopping cart and the checkout process:

1. basket_b2c.html.php
2. ro_basket_b2c.html.php
3. basket.php
4. ro_basket.php

Files 1 & 2 are in: /components/com_virtuemart/theme/templates/basket
Files 3 & 4 are in: /administrator/components/com_virtuemart/html

basket_b2c.html.php and ro_basket_b2c.html.php are themplates files used to display the chart.

At about line 32, add the following code to the 2 theme files:

Code:


Then you have to add code to create the field 'product_thumb_image' in the product records. To do that you must edit basket.php and ro_basket.php and add this code at line 90:

Code:

// prepare thumb image

if( $ps_product->get_field($_SESSION['cart'][$i]["product_id"], "product_thumb_image") ) {
$product_thumb_image = $ps_product->get_field($_SESSION['cart'][$i]["product_id"], "product_thumb_image");
}
else {
$product_thumb_image = 0;
}

if( $product_thumb_image ) {
if( substr( $product_thumb_image, 0, 4) != "http" ) {
if(PSHOP_IMG_RESIZE_ENABLE == '1') {
$product_thumb_image = $mosConfig_live_site."/components/com_virtuemart/show_image_in_imgtag.php?filename=".urlencode($product_thumb_image)."&newxsize=".PSHOP_IMG_WIDTH."&newysize=".PSHOP_IMG_HEIGHT."&fileout=";
}
else {
if( file_exists( IMAGEPATH."product/".$product_thumb_image )) {
$product_thumb_image = IMAGEURL."product/".$product_thumb_image;
}
else {
$product_thumb_image = IMAGEURL.NO_IMAGE;
}
}
}
}
else {
$product_thumb_image = IMAGEURL.NO_IMAGE;
}

$product_rows[$i]['product_thumb_image'] = "". ""
. "

";
//end of prepare thumb image
 

User Login



Technologies

joomla services, joomla tutorials,web services

Donate Here

Enter Amount:

Visitors Counter

Joomla services, Joomla tutorialsJoomla services, Joomla tutorialsJoomla services, Joomla tutorialsJoomla services, Joomla tutorialsJoomla services, Joomla tutorialsJoomla services, Joomla tutorialsJoomla services, Joomla tutorials
Joomla services, Joomla tutorialsToday1085
Joomla services, Joomla tutorialsTimes Viewed580449