Announcement

Collapse
No announcement yet.

Large image on receipt page

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

    Large image on receipt page

    Client would like a large image of the first purchased product on the receipt page.
    Does anyone know how this may be generated?
    Placing the following produces a small image and some text descriptions but I cannot make the image large and remove the text.
    I assume the 'Thumbnail' in the product dialogue must be the large image?
    Code:
    <Actinic:XMLTEMPLATE NAME="ProductLine">
    <Actinic:THUMBNAIL>
    
    	<img src="<actinic:variable name="Thumbnail" />" >
    
    </Actinic:THUMBNAIL>
    </Actinic:XMLTEMPLATE>
    Thank you.
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    In SD 2013 the code used is:
    Code:
    <img class="cartthumbnail" src="<actinic:variable name="Thumbnail" />" >
    And the thumbnail is sized down via CSS:
    Code:
    img.cartthumbnail {
    	border: 0px;
    	margin-left: 2px;
    	margin-right: 2px;
    	width: 25px;
    }
    So you could alter that 25px or delete the line.

    Search the Library for cartthumbnail to locate the code.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      However, if you only want the first such item on the receipt to be large and any following ones to be small, you'll need JavaScript to do this. E.g. leave the CSS alone and have some jQuery JS just above </head> in the Receipt Page Layout like (I'm assuming you already have jQuery loaded somewhere in Standard JavaScript Header Functions):
      Code:
      <script type="text/javascript">
      $(document).ready(function(){$('.cartthumbnail').first().css('width', '250px')});
      </script>
      N.B. untested.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thanks Norman

        I couldn't make that work, I also tried putting the javascript above the reference to the actinic.css.

        The test site is http://www.graphicz.gb.com/trship/

        Login: user: info@graphicz.co.uk Password: xy

        The body code is
        Code:
        <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Receipt%27">
        <p>&nbsp;</p>
        <Actinic:XMLTEMPLATE NAME="ProductLine">
        <Actinic:THUMBNAIL>
        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e" >
        	<img class="cartthumbnail" src="<actinic:variable name="Thumbnail" />" >
        </actinic:block>
        
        <actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e">
        	<img style="border: 0;" src="thumbnail-preview.gif" width="36" hspace="2" >
        </actinic:block>
        </Actinic:THUMBNAIL>
        </Actinic:XMLTEMPLATE>
        <a class="fancybox" href="#inline1" title="Lorem ipsum dolor sit amet"><b>Click here for Print Friendly Version >></b></a>
        <div id="inline1" style="width:700px;display: none;">
        		<actinic:variable name="ReceiptPageInnerLayout" value="Receipt Page Bulk" />
        	</div>
        <p>&nbsp;</p>
        
        </actinic:block>
        				<actinic:variable name="INNERLAYOUT" >
        I also seem to have rogue text "NETQUOTEVAR:REFPAGE"

        Thanks
        Jonathan Chappell
        Website Designer
        SellerDeck Website Designer
        Actinic to SellerDeck upgrades
        Graphicz Limited - www.graphicz.co.uk

        Comment


          #5
          Since no-one can see your receipt page without buying something, try moving the JS to above </head> in your overall layout. This will make it work in the Cart, not just the Receipt.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            It is a test site so test purchases can be made and the login was to save checkout time, however, the code is now on every page so adding a product and viewing cart will show the code at the top of the innerlayout.

            The receipt page will use the usual outer layout hence the popup for print friendly version.
            I really need to know where the layouts defined by <Actinic:XMLTEMPLATE NAME="ProductLine"> and <Actinic:THUMBNAIL> reside so I can make copies and edit (if possible).

            Just for clarity, this is the sort of receipt page I am after, hence the need for the large image:
            Last edited by graphicz; 09-Apr-2013, 09:40 AM. Reason: Add screenshot
            Jonathan Chappell
            Website Designer
            SellerDeck Website Designer
            Actinic to SellerDeck upgrades
            Graphicz Limited - www.graphicz.co.uk

            Comment


              #7
              You are loading jQuery but in an unusual place. I.e. just before the </body> tag. Too late for earlier code to use it:
              Code:
              <script type="text/javascript" src="jquery-1.9.0.min.js"></script><script type="text/javascript" src="jquery.fancybox.js"></script>
              <script type="text/javascript" src="custom.js"></script>
              Such code is much better located at the bottom of layout Standard JavaScript Header Functions.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                I have changed that and your solution works, thank you Norman.

                My only problem is that the receipt page does not display the name of the purchased product and NETQUOTEVAR:REFPAGE appears before the receipt page bulk proper.

                I have removed the conditionals so that the effect is seen when viewing cart

                It doesn't seem to like the <Actinic:XMLTEMPLATE NAME="ProductLine"> tag being in two places but without it the image does not display
                Jonathan Chappell
                Website Designer
                SellerDeck Website Designer
                Actinic to SellerDeck upgrades
                Graphicz Limited - www.graphicz.co.uk

                Comment


                  #9
                  The SD Perl scripts need well-formed cart templates to work properly. There should only be one

                  <Actinic:XMLTEMPLATE NAME="ProductLine">
                  .
                  and its corresponding and correctly nested:
                  .
                  </Actinic:XMLTEMPLATE>

                  It may be worth reverting that layout to factory and then re-introduct the tweak:

                  <img class="cartthumbnail" src="<actinic:variable name="Thumbnail" />" >
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    Thanks Norman

                    Your fix works to make the first thumbnail in the cart summary large.

                    Client wishes the large thumbnail to be outside the <Actinic:XMLTEMPLATE NAME="ProductLine"> and its corresponding </Actinic:XMLTEMPLATE> hence using the code in post 1 above to try and produce this image just prior to the Receipt Page Bulk Area.

                    I guess that is not actually possible?

                    Is this something that could be achieved by custom scripting if the client chose to commission someone to write it?

                    Thanks
                    Jonathan Chappell
                    Website Designer
                    SellerDeck Website Designer
                    Actinic to SellerDeck upgrades
                    Graphicz Limited - www.graphicz.co.uk

                    Comment


                      #11
                      Could probably be done by some custom Jquery code that rearranges the DOM.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Is that something Drillpine could quote for?
                        Jonathan Chappell
                        Website Designer
                        SellerDeck Website Designer
                        Actinic to SellerDeck upgrades
                        Graphicz Limited - www.graphicz.co.uk

                        Comment


                          #13
                          Certainly. Wouldn't be a huge job. Email for details.
                          Norman - www.drillpine.biz
                          Edinburgh, U K / Bitez, Turkey

                          Comment


                            #14
                            Solved!

                            Norman produced an excellent solution at very reasonable cost.

                            If you wish to display the receipt page in the normal web page outer layout with, above the receipt page bulk, a large image of the first purchased product, a thank you message and social networking links to that product, then Norman has the solution.
                            Jonathan Chappell
                            Website Designer
                            SellerDeck Website Designer
                            Actinic to SellerDeck upgrades
                            Graphicz Limited - www.graphicz.co.uk

                            Comment

                            Working...
                            X