Announcement

Collapse
No announcement yet.

Message for Norman Rouxel re: images in cart

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Message for Norman Rouxel re: images in cart

    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
    Regards
    David

    #2
    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
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      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
      Regards
      David

      Comment


        #4
        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
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          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
          Regards
          David

          Comment


            #6
            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:

            Code:
            #
            # 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

            Code:
            	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
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Hi Norman - that seems to work fine under 6.1.3. Another one to add to your patches page.

              Thanks again !!!
              Regards
              David

              Comment


                #8
                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
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment

                Working...
                X