Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    130
    Plugin Contributions
    0

    Default modified "recent purchases" code

    In my install of 1.3.0.2 I modified the code that creates the recent purchases sidebox - the stock version places the cart icon at the end of the product name. In multi-line product names that made things look pretty uneven. My modification removes the unordered list (which also didn't display right in FireFox, at least in the template I use - Future_zen) and places the cart icon in front of the product name, which also puts a bit of space between the items listed (without resorting to css padding).

    See attached file for it in action (rp.jpg).

    Dennis
    Attached Images Attached Images  

  2. #2
    Join Date
    Jul 2004
    Posts
    130
    Plugin Contributions
    0

    Default Re: modified "recent purchases" code

    I tried to attach the php file as well, but it didn't "take". Here is the entire file in text form - goes in includes/templates/YOUR-TEMPLATE/sideboxes/tpl_order_history.php

    <?php
    /**
    * Side Box Template
    *
    * @package templateSystem
    * @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_order_history.php 3324 2006-03-31 06:02:07Z drbyte $
    */
    $content = "";
    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
    $content .= '' . "\n" ;

    for ($i=1; $i<=sizeof($customer_orders); $i++) {

    $content .= '<a href="' . zen_href_link(basename($PHP_SELF), zen_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $customer_orders[$i]['id']) . '">' . zen_image($template->get_template_dir('cart.gif', DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . 'cart.gif', 'Add this item to cart') . '</a>&nbsp;&nbsp;<a href="' . zen_href_link(zen_get_info_page($customer_orders[$i]['id']), 'products_id=' . $customer_orders[$i]['id']) . '">' . $customer_orders[$i]['name'] . '</a><br />' . "\n" ;
    }
    $content .= '' . "\n" ;
    $content .= '</div>';
    ?>

 

 

Similar Threads

  1. is there an addon "recent orders"
    By win8win in forum Addon Sideboxes
    Replies: 6
    Last Post: 3 May 2012, 07:34 PM
  2. Replies: 4
    Last Post: 16 Oct 2011, 12:58 AM
  3. Advice on "recent orders" not showing
    By Mochino in forum Managing Customers and Orders
    Replies: 21
    Last Post: 28 Jan 2009, 08:16 AM
  4. How to Change "Redemption Code" to "Coupon Code" & "GV Code"
    By dmfelder in forum Basic Configuration
    Replies: 5
    Last Post: 16 Apr 2008, 05:50 PM
  5. about us module, modified "information" title
    By yosemite in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 10 Sep 2007, 03:39 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