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 Gradwell
0
 
 
FIxd this with in 2 secs with your tutorial..
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar solar
0
 
 
great tutorial.
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar ChanCALLIE35
0
 
 
This is what I was looking for a while! Thank you for this topic just about school! Once somebody state that In union there is might. Our powerfully trained team can help you in writing custom essays.
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar grant
0
 
 
please god i can't understand that programing language.
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar jogos de carros
0
 
 
Our experience with them was dismal at best. The designs we sent for coding were largely ignored, with changes to the layout, fonts and colors made arbitrarily by the “developer” assigned to the project.
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar proud.joomla.user
0
 
 
tried to add the code to line 90 and it did not work, under what LINE of code (please post actual code) do i need to enter the code.

thanks
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar LeopardDriver
0
 
 
What VM version you are using dude ? It works superb and perfect on point!
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar Dimas
0
 
 
it is work.. thank you very much!!
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar ghj
0
 
 
it works
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar Ali
0
 
 
Works great Thanks
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar YRG
0
 
 
Didn't know about this. I will have to try it out.
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar Aamir
0
 
 
gr8 nice
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
It works.. thank you!!
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar Zidni Mubarock
0
 
 
How if add image product on cart module, help me please... :)
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar zibideusz
0
 
 
it this tutorial when you click in thumb you are going to product page.
what can i do to see origignal size image?
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar Admin
0
 
 
No, but that can be done.
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
This is a treat tutorial :)
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar john
0
 
 
some line numbers don't match up.....
under which lines of code do these both need to be under
Much obliged.
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar john
0
 
 
does anyone have this hack for VM 1.1.4?
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar john
0
 
 
MCallf, thanks for this solution:
http://forum.virtuemart.net/index.php?topic=65827.0

Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar tiffany
+1
 
 
it this tutorial when you click in thumb you are going to product page.
what can i do to see origignal size image?
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar macaulus
+1
 
 
great, works sweet, i did have to add a line to the english.php
'PHPSHOP_CART_IMAGE' => 'Image',
in administrator/components/com_virtuemart/languages/common/english.php
and also add a new to the
basket_b2c.html.php and ro_basket_b2c.html.php to include the heading above the image
_('PHPSHOP_CART_IMAGE') ?>
Worked sweet though, thanks for the hack
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar macaulus
0
 
 
seems that some of the above got stripped out, pretty sure you can see what i mean though when you look at the files, just needs the th in there
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar ti_lionne
0
 
 
Hello
Can someone please tell me where i have to enter the codes? As in the virtual mart I can't see where to enter it.
There are IT guys working on my website and they said i have to pay extra to add this to the website.
so if i can add it myself that would be great!
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar Fariida
0
 
 
Hi ti_lionne I hope this finds you well. I just upgraded my virtuemart to 1.1.5. I had this same code on my previous version of virtuemart which was 1.1.3. When I upgrade the code stopped working but I used the same code above but placed it at different lines for the administrator files only.
For basket.php file i added the "//prepare thumb image " to "//end of prepare thumb image" (see code above) at line 78
and the same code on ro_basket.php at line 109.

Please follow the same instructions for the template folder files.

I hope that helps
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
For just clarification, Is this linking IMAGES to be link to a "ADD TO CART"? Instead of using a TEXT "ADD TO CART"?

Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar jogos online
0
 
 
is the only way to describe the quality of work received. In the end They stuck firmly to the originally quoted fee and were the resource persons uninterested in discounting the job even though the project was so poorly Executed. Avoid at all costs.
Name *
Email (For verification & Replies)
URL
Code   
Submit Comment
Cancel
avatar adipex
0
 
 
It is an amazing post and the site; I am impressed by this post a lot
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: