View Full Version : Message for Norman Rouxel re: images in cart
skinnybloke
03-Dec-2003, 03:29 PM
Hi Norman - I am using your "display images in the checkout phase" (and not for the first time either !!).
A quick question - can this be setup so that it shows images when you click on the shopping cart but not when it is going through the checkout phase.
Cheers
David
NormanRouxel
03-Dec-2003, 04:03 PM
I've got 2 different ways of doing this. Which one are you using? Post the name of the readme file if you have it.
Norman
skinnybloke
04-Dec-2003, 08:28 AM
Hi Norman - I'm pretty sure that it is this.
v6-simpleunscaledimagesincheckout
I am using version 6 - the images are already in thumbnail format at the required size and with filenames = productrefno_thumb.jpg
NormanRouxel
04-Dec-2003, 10:09 AM
Hmmm... Not too sure.
If you mean you use the "Quantity in Shopping Cart" type display then you can just restore ActinicOrder.pm to it's original state.
This will mean that you see the image only while confirming the Add to Cart but not in any susequent pages.
Other than that it would mean some additional patching in ActinicOrder.pm to determine if the code is being called from ShoppingCart pages (URL will contain "ca0000") or OrderScript pages and inhibit the image creation of the page URL contained "os0000".
There may be other ways for the scripts to determine the phase they're being called from but I don't want to get into such patching for a one-off.
Norman
skinnybloke
05-Dec-2003, 10:16 AM
Hi Norman - I dont expect any patching - its a nice to have only.
What I want is 1.) confirming "add to cart" as you mentioned and 2.) when you click to show what is in the shopping basket - I think this is ca000001.pl ACTION = SHOWCART.
I do not wnat to show the images in the checkout stage - i.e. act_order01.html - act_order04.html
NormanRouxel
05-Dec-2003, 12:19 PM
Unfortunately the Action-SHOWCART and the checkout use the same routine in ActinicOrder.pm to display the cart summary. It might be possible to use the Perl variable $bIncludeButtons to determine whether you're in the checkout ot order phases.
Try this patch (it's untested as I don't use this code anywhere)
In your patched ActinicOrder.pm locate the fragment:
#
# JPEG images
#
if ( -e $NorcatCatPath . $NorcatImagePrefix . $NorcatRef . $NorcatImageSuffix . '.jpg' ) # look for a jpeg
{
$NorcatImage = $NorcatImageStart . $NorcatImagePrefix . $NorcatRef . $NorcatImageSuffix .
'.jpg"' . $NorcatImageEnd; # image HTML
}
# GIF images - in case anyones still using them - You can delete this fragment if you don't use GIF's.
elsif ( -e $NorcatCatPath . $NorcatImagePrefix . $NorcatRef . $NorcatImageSuffix . '.gif' ) # look for a .gif
{
$NorcatImage = $NorcatImageStart . $NorcatImagePrefix . $NorcatRef . $NorcatImageSuffix .
'.gif"' . $NorcatImageEnd;
}
Replace with this
if ( $bIncludeButtons ) # only show images on Editable Pages
{
#
# JPEG images
#
if ( -e $NorcatCatPath . $NorcatImagePrefix . $NorcatRef . $NorcatImageSuffix . '.jpg' ) # look for a jpeg
{
$NorcatImage = $NorcatImageStart . $NorcatImagePrefix . $NorcatRef . $NorcatImageSuffix .
'.jpg"' . $NorcatImageEnd; # image HTML
}
# GIF images - in case anyones still using them - You can delete this fragment if you don't use GIF's.
elsif ( -e $NorcatCatPath . $NorcatImagePrefix . $NorcatRef . $NorcatImageSuffix . '.gif' ) # look for a .gif
{
$NorcatImage = $NorcatImageStart . $NorcatImagePrefix . $NorcatRef . $NorcatImageSuffix .
'.gif"' . $NorcatImageEnd;
}
}
Norman
skinnybloke
08-Dec-2003, 11:27 AM
Hi Norman - that seems to work fine under 6.1.3. Another one to add to your patches page.
Thanks again !!!
NormanRouxel
08-Dec-2003, 12:17 PM
Glad it worked. It strange that I've had Images in Checkout since Actinic 3 and it's still not a feature since it would be trivial to implement. Maybe version 7:)
Also, do you know that I've a (quite big) patch that will implement Images in Checkout without the need for the image names to be related to the Product Reference. That's on www.rouxel.cwc.net/actinicstuff.html - see V6-ImagesInCheckout.txt.
Norman
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.