Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jun 2007
    Location
    Laurinburg, NC
    Posts
    165
    Plugin Contributions
    0

    Default Add checkout link to shopping cart side box below items

    I have bee looking for an hour now but have not found what I am looking for
    What I want to do is add a function to the shopping cart side box. I know you can click on the side box header to go to checkout, but to a customer it is not that obvious. So what I would like to do is add a link to the bottom of the shopping cart list that says checkout. Having this bringing them to the checkout page. I am learning how to use the template override system, but I do not know PHP (maybe I could fake it so everyone thinks I do)
    I am using 1.3.8a at http://shop.nilandsplace.com
    Thanks James

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Add checkout link to shopping cart side box below items

    You're talking about the shopping cart sidebox, right?

    Two ways to do this...

    Both are edits of the following file:

    includes/templates/template_default/sideboxes/tpl_shopping_cart.php

    FTP a copy of this file to your local machine.

    Open it for editing, with a good PLAIN TEXT EDITOR, such as Crimson Editor.

    Right at the bottom of the file, the following appears:

    PHP Code:
      }
      
    $content .= '</div>';
    ?> 
    -------------------------------------------------------------

    You can either HARD CODE (the untidy method) the button link as follows

    PHP Code:
    }
      
    $content .= '</div>';

      
    $content .= '<div id="checkoutButton"><a href="https://www.yourwebsite.com/index.php?main_page=checkout_shipping"><img src="includes/templates/your_template/buttons/english/button_checkout.gif" alt="Checkout" title=" Checkout " width="114" height="20" /></a></center></div>';

    ?> 
    NB: make sure you put in your website URL and apply any other custom stuff like width and height settings for your button image.

    -----------------------------------------------------

    Or use the tidy method (recommended):

    PHP Code:
    }
      
    $content .= '</div>';

      
    $content .= '<div class="checkoutButton"><a href="' zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL') . '">' zen_image_button(BUTTON_IMAGE_CHECKOUTBUTTON_CHECKOUT_ALT) . '</a></div>';

    ?> 
    SAVE the file on your local drive.

    On your remote server, navigate to:

    includes/templates/YOUR_TEMPLATE/sideboxes/

    and then FTP the edited file to that folder. If there is no folder called "sideboxes" in your template folder, create it.

    NOTE: I have given this its own style ID (checkoutButton) so I can give it a style later if I like.
    20 years a Zencart User

  3. #3
    Join Date
    May 2009
    Posts
    34
    Plugin Contributions
    0

    Default Re: Add checkout link to shopping cart side box below items

    thanks so much for this! Just what i was looking for :)

    just a tiny problem. The color of the bar on which the checkout button sits is different from the rest of the sidebox.

    is there any way i can change the color of that bar?

    thks!

  4. #4
    Join Date
    Jun 2007
    Location
    Laurinburg, NC
    Posts
    165
    Plugin Contributions
    0

    Default Re: Add checkout link to shopping cart side box below items

    I did it the tidy method way and the code works great. Just one thing how do I center the button in the box?

  5. #5
    Join Date
    May 2009
    Posts
    34
    Plugin Contributions
    0

    Default Re: Add checkout link to shopping cart side box below items

    hey Makoshark,

    try this:

    add <div align="center"> after <div class="checkoutButton">

    worked for me :)

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Add checkout link to shopping cart side box below items

    Quote Originally Posted by soyabeane View Post
    hey Makoshark,

    try this:

    add <div align="center"> after <div class="checkoutButton">

    worked for me :)
    Better like this:

    HTML Code:
    <div align="center" class="checkoutButton">
    or you'll need two closing </div> tags with your method... because you are nesting a <div> inside a <div>.
    20 years a Zencart User

  7. #7
    Join Date
    May 2009
    Posts
    34
    Plugin Contributions
    0

    Default Re: Add checkout link to shopping cart side box below items

    cool thanks!

  8. #8
    Join Date
    Jun 2007
    Location
    Laurinburg, NC
    Posts
    165
    Plugin Contributions
    0

    Default Re: Add checkout link to shopping cart side box below items

    I got the code right the first time
    PHP Code:
    /* modified to add checkout button to shopping cart sidebox*/
    $content .= '<div class="checkoutButton"><div align="center"><a href="' zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL') . '">' zen_image_button(BUTTON_IMAGE_CHECKOUTBUTTON_CHECKOUT_ALT) . '</a></div></div>';
    ?> 
    If anyone wants to see this in action I have set up a test account. So please do not create accounts for testing
    You can use this to test. User You can use this to test. User [email protected] and the password is test1234
    Here is my website click Nilands Place Campsite
    Have Fun makoshark AKA James
    Last edited by Makoshark; 27 May 2009 at 02:02 AM.

  9. #9
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: Add checkout link to shopping cart side box below items

    Ma,
    Looks nice, thanks for the update on the fix..

  10. #10
    Join Date
    Dec 2008
    Location
    San Diego, California
    Posts
    54
    Plugin Contributions
    0

    Default Re: Add checkout link to shopping cart side box below items

    That worked well for me too.

    I would like to display the button only if there is something in the cart.

    Otherwise, it does not display.
    1.3.8
    Go Daddy Hosted

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Shopping cart side box
    By UrKoS in forum Basic Configuration
    Replies: 4
    Last Post: 6 Sep 2011, 06:16 PM
  2. 1ea.- appearing in shopping cart side box when I add a product
    By jamesdavid in forum General Questions
    Replies: 7
    Last Post: 2 Mar 2010, 06:15 PM
  3. shopping cart side box
    By poconos in forum Basic Configuration
    Replies: 2
    Last Post: 8 Apr 2009, 11:29 PM
  4. Checkout button below shopping cart sidebox?
    By navido in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Mar 2009, 05:11 PM
  5. need to make 'checkout' link in shopping cart side box, not in header
    By jamesdavid in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 29 May 2008, 03:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg