Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jul 2008
    Location
    Dublin
    Posts
    9
    Plugin Contributions
    0

    customer issue Next & Previous button for New products Listing

    Hi

    I am trying to add next and previous buttons to the top of the New products listing.

    I have searched the forums but have not been able to find anyway of changing from the standard text to a button.

    I found the following lines in button_names.php:
    define('PREVNEXT_BUTTON_NEXT', 'button_prev.gif');
    define('PREVNEXT_BUTTON_LAST', 'button_next.gif');

    I have edited the tpl_products_new_default.php file and see that the code that produces this next/prev link is called in
    <div id="newProductsDefaultListingTopNumber"

    but I don't know how to get the button instead of the text link.

    Anyone out there know how ?


    Regards


    Jenny

  2. #2
    Join Date
    Oct 2006
    Posts
    624
    Plugin Contributions
    0

    Default Re: Next & Previous button for New products Listing

    There are several ways to do this. One way is as follows:

    First, put your previous and next buttons in your '/images' folder under your Zen Cart installation.

    E.g. '/images/prev.gif' and '/images/next.gif'.

    Next, override the file /includes/languages/english.php as follows.

    Replace the following two lines:

    PHP Code:
    define('PREVNEXT_BUTTON_PREV''[&lt;&lt;&nbsp;Prev]');
    define('PREVNEXT_BUTTON_NEXT''[Next&nbsp;&gt;&gt;]'); 
    with these two lines. Adjust according to your actual setup (e.g. actual image file name).

    PHP Code:
    define('PREVNEXT_BUTTON_PREV''<img src="images/prev.gif" alt="&lt;&lt;&nbsp;Prev" />');
     
    define('PREVNEXT_BUTTON_NEXT''<img src="images/next.gif" alt="&lt;&lt;&nbsp;Next" />'); 
    Finally, refresh your browser and verify the changes.

    Do note that I've only included the basic HTML img attributes, you should add any other img attributes (e.g. title, width, height) according to your own needs and other best practices.
    Goh Koon Hoek, author of "e-Start Your Web Store with Zen Cart".
    Printed book: www.lulu.com/content/10576284
    Electronic book and Errata: www.cucumbermedia.com/store

  3. #3
    Join Date
    Jul 2008
    Location
    Dublin
    Posts
    9
    Plugin Contributions
    0

    Default Re: Next & Previous button for New products Listing

    Hi Canopy,

    That works perfectly - thanks for your help.


    Regards


    Jenny

 

 

Similar Threads

  1. Next/ Previous buttons don't work for specific products
    By bhensarl in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 9 Jan 2012, 01:22 PM
  2. next previous button positions
    By ilsita in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 13 Oct 2009, 06:46 AM
  3. Next, Previous, Listing Button Layout Issue
    By sfuredi in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 28 May 2009, 03:15 PM
  4. Disabling Next/Previous & Product Listing images
    By emilfalcon in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 8 Nov 2007, 10:21 PM
  5. Sub category next & previous button
    By slabadoo in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 10 May 2007, 11:59 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