Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2006
    Posts
    248
    Plugin Contributions
    0

    help question Create Button in Sidebox

    Hi,

    I have created a button called 'Checkout' which I would like to insert at the bottom of the shopping cart sidebox on my site www.handcrafteduk.com.

    The Shopping cart i am using is from the mod 'cartcontentssidebox'.

    I have already saved my new checkout button to /public_html/includes/templates/custom/buttons/english

    Could someone tell me the code and, where I insert this to put this button at the bottom of my modded shopping cart sidebox? I've tried inserting various codes in includes/sideboxs and includes/modules/sideboxes but nothing seems to work!

    I'd appreciate the help!

    Thanks,

    Gary

  2. #2
    Join Date
    Nov 2006
    Location
    Papworth, Cambridgeshire, UK
    Posts
    731
    Plugin Contributions
    3

    Default Re: Create Button in Sidebox

    Do you mean the Cart Summary Sidebox contribution?
    If so, I imagine you would need to copy tpl_cart_summary.php from template_default/sideboxes to your templates/custom/sideboxes folder and make your changes there.

    Rgds,

  3. #3
    Join Date
    Jul 2006
    Posts
    248
    Plugin Contributions
    0

    Default Re: Create Button in Sidebox

    Thanks for the reply. I'm just not sure what I need to change though!!

  4. #4
    Join Date
    Jul 2006
    Posts
    248
    Plugin Contributions
    0

    Default Re: Create Button in Sidebox

    Ok, I'm almost there!

    Been on it all afternoon and now I have the button in place but need to know how to do the link!

    In /public_html/includes/templates/custom/sideboxes I have placed this code into tpl_cart_summary:

    <?php
    /**
    * Side Box Template
    *
    * @package sideboxes
    * @copyright Copyright 2003-2006 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_cart_summary.php $
    */
    $content = "";
    $totalsDisplay . '</a>';
    $content = $totalsDisplay;
    $content .= ' <br />' . zen_image_submit (BUTTON_IMAGE_CHECKOUT,HEADER_CHECKOUT_BUTTON, 'value="' . HEADER_CHECKOUT_BUTTON . '" ');
    ?>


    I have found the following code in tpl_shopping_cart_default:

    $content .= $products[$i]['quantity'] . BOX_SHOPPING_CART_DIVIDER . '</span><a href="' . zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']) . '">';


    Now I guess I need to copy some of the information from the original shopping cart to the tpl_cart_summary file, so that, when the button 'Checkout' is pressed, it takes the user straight to their cart

    I've been trying for ages but can't do it!! Can anyone please help?

    Gary www.handcrafteduk.com

  5. #5
    Join Date
    Jul 2006
    Posts
    248
    Plugin Contributions
    0

    Default Re: Create Button in Sidebox

    Sorted!!!

    Just in case anyone wants to know for future reference I put this code into

    /public_html/includes/templates/custom/sideboxes/tpl_cart_summary:


    <?php
    /**
    * Side Box Template
    *
    * @package sideboxes
    * @copyright Copyright 2003-2006 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_cart_summary.php $
    */
    $content = "";
    $totalsDisplay . '</a>';
    $content = $totalsDisplay;
    $content .= '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a>'; ?>




    Hopefully that will help someone out in future!

    Gary

  6. #6
    Join Date
    Nov 2006
    Location
    Papworth, Cambridgeshire, UK
    Posts
    731
    Plugin Contributions
    3

    Default Re: Create Button in Sidebox

    If you add something to a cart in your shop to get a shopping cart display with a checkout button, and then select view-source in your browser, it will show you the source code for the page. A search for "checkout" in the source will gice you the code used by the shopping cart to start the checkout process. i.e. How to call the checkout process from your button.

    Rgds,

 

 

Similar Threads

  1. v150 How can I change a default submit button in a sidebox to an image button?
    By JacobBushnell in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Aug 2016, 07:17 PM
  2. Replies: 12
    Last Post: 25 Jun 2010, 06:02 PM
  3. Create popup for button
    By miles in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Jul 2008, 02:35 AM
  4. Text Sidebox button to Image sidebox Button
    By xavierlim in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Feb 2007, 09:57 AM

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