Upgrade Joomla 1.5 to Joomla 1.6

Product Image on Virtuemart Cart Page

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:

<td><?php echo $product['product_thumb_image'] ?></td>


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'] = "<a href=\"$url\">"
. "<img width=100 src= $product_thumb_image />"
. "</a><br />";
//end of prepare thumb image

Comments

avatar C.A.Mo
0
 
 
Hello.

This tutorial does not work in version 1.1.5.

Please create a new one with specified exact.

many thanks.

C.A.M
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar AshleeOneil
-1
 
 
If you are willing to buy real estate, you would have to receive the loan. Moreover, my sister usually takes a bank loan, which seems to be really fast.
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar C.A.Mo
0
 
 
Hello.

This tutorial does not work in version 1.1.5.

Please create a new one with specified exact.

many thanks.

C.A.M
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar David
0
 
 
This works, but there's no 'header' for the image. It shifts everything else over. How to fix the header (i.e. there is no Product Thumbnail text in the header area). See my site www.ikhlasgreetings.com for the problem I'm describing. Add something and go to the cart and you'll see what I'm talking about.

Thank you
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar David
+1
 
 
Did some hacking of my own. Added 'PHPSHOP_CART_PRODUCT_IMAGE' => 'Product Image' to the English common language file, /home/ikhlasgr/public_html/administrator/components/com_virtuemart/languages/common/english.php, then repalced the sku from the basket files with the product image constant.

Didn't really need the sku there so no lose.

I'm a newbie to this, would like more info on how to format the cart page so I could make it look better, but this will have to do.
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
button_logo_portfolio
button_quote
button_testimonials

Subscribe Tutorials

Enter your email address:

Paypal Donation

Enter Amount:

Subscribe Joomla Tutorials Newsletter

Name:

Email:


Enter your email address: