Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jul 2006
    Location
    SF Bay Area
    Posts
    867
    Plugin Contributions
    1

    Default Simple ZC gallery

    Here is simple one line way to make a gallery of sold products.

    create a file: includes/local/configure.php

    and add this one line to it:

    <?php if ($_GET['cPath']==12){define('STORE_STATUS',1);} ?>

    Be sure to replace the "12" with the category ID of the category that is to be just for your sold products.

    Now products viewed in that category will switch the store to showcase mode.

    An example/demo is here: http://www.montanapens.com

    It's not perfect, but it does solve problem for simple site with one of a kind items.

    Move sold products to your "gallery" category.

  2. #2
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Simple ZC gallery

    Quote Originally Posted by kiddo View Post
    Here is simple one line way to make a gallery of sold products.

    create a file: includes/local/configure.php

    and add this one line to it:

    <?php if ($_GET['cPath']==12){define('STORE_STATUS',1);} ?>

    Be sure to replace the "12" with the category ID of the category that is to be just for your sold products.

    Now products viewed in that category will switch the store to showcase mode.

    An example/demo is here: http://www.montanapens.com

    It's not perfect, but it does solve problem for simple site with one of a kind items.

    Move sold products to your "gallery" category.
    Followed instructions above, including altering categoryID to suit...
    Not working.. product still shows sold out image..not in showcase mode..

  3. #3
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Simple ZC gallery

    This missing piece of information here is how that new configure file gets invoked. However, that can be side-stepped by simply adding the new line to your existing includes/configure.php. It's a neat idea with very wide applications.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  4. #4
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Simple ZC gallery


    Works.. redid my /includes/local/configure.php file as
    Code:
    <?php
    if ($_GET['cPath']==67){define('STORE_STATUS',1);}
    ?>
    Kuroi, it works because in /includes/application_top.php
    is the following code
    Code:
     * Set the local configuration parameters - mainly for developers
     */
    if (file_exists('includes/local/configure.php')) {
      /**
       * load any local(user created) configure file.
       */
      include('includes/local/configure.php');
    }
    /**
    Thank you Kiddo...

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Simple ZC gallery

    Quote Originally Posted by misty View Post
    Kuroi, it works because in /includes/application_top.php
    is the following code
    Code:
     * Set the local configuration parameters - mainly for developers
     */
    if (file_exists('includes/local/configure.php')) {
      /**
       * load any local(user created) configure file.
       */
      include('includes/local/configure.php');
    }
    /**
    Should have known that. Thanks for the reminder Misty. Zen Cart has literally dozens of these small bits of code for over-riding this or adding that additional behaviour. Uncovering them is one of life's free pleasures
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Feb 2006
    Posts
    326
    Plugin Contributions
    0

    Default Re: Simple ZC gallery

    I'm trying to get this to work... I did not have a "includes/local" directory, so I created one and added a configure.php file with the following contents:
    <?php
    if ($_GET['cPath']==42){define('STORE_STATUS',1);}
    ?>
    42 is the number of the category I created to showcase. Then I created a product in this category. It shows in the category but as an item for sale.
    Did I miss something?
    Thank you!

    edit... got to wondering if it was supposed to be in the admin/includes/local, so I put the same file there, too. Still showing as for sale.
    Give us your best shot!
    http://www.photoimprints.com

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Simple ZC gallery

    That's because this approach reads the category from the URL. However, you are using a URL re-writing mod and so the cPath c=variable isn't there.

    You can still use this approach, but you will need to amend the condition to use what you actually have in your URL for this category.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #8
    Join Date
    Feb 2006
    Posts
    326
    Plugin Contributions
    0

    Default Re: Simple ZC gallery

    Quote Originally Posted by kuroi View Post
    That's because this approach reads the category from the URL. However, you are using a URL re-writing mod and so the cPath c=variable isn't there.

    You can still use this approach, but you will need to amend the condition to use what you actually have in your URL for this category.
    I understand what you are saying, but don't have a clue how to amend the path. If, for example, the below is the URL to the category I wish to use, can you tell me how to amend the condition?
    Thank you,

    http://www.photoimprints.com/gallery-c-42.html
    Give us your best shot!
    http://www.photoimprints.com

  9. #9
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Simple ZC gallery

    I like this.. However, if I wanted to remove all of the shopping cart buttons and only leave the "Next" and "Previous" nav buttons, how would I do that?

    I would like to give this a stab, but I want to make sure that I understand what it is I am doing.. I would modify my includes/configure.php file correct.. Is this what it should look like??

    Code:
    <?php
    /**
     *
     * @package Configuration Settings
     * @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
     */
    
    
    /*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
    /***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/
    
    // Define the webserver and path parameters
      // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
      // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
      define('HTTP_SERVER', 'http://mydomain.com');
      define('HTTPS_SERVER', 'https://mydomain.com');
    
      // Use secure webserver for checkout procedure?
      define('ENABLE_SSL', 'false');
    
    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      define('DIR_WS_CATALOG', '/');
      define('DIR_WS_HTTPS_CATALOG', '/');
    
      define('DIR_WS_IMAGES', 'images/');
      define('DIR_WS_INCLUDES', 'includes/');
      define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
      define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
      define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
      define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
      define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
      define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
    
      define('DIR_WS_PHPBB', '/');
    
    // * DIR_FS_* = Filesystem directories (local/physical)
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      define('DIR_FS_CATALOG', '/home/content/m/a/n/maneattractions/html/');
    
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
      define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
      define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
      define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
      define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
    
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', 'zen_');
      define('DB_SERVER', 'XXXXX.XXXXXX.net');
      define('DB_SERVER_USERNAME', 'XXXXXXX');
      define('DB_SERVER_PASSWORD', '*******');
      define('DB_DATABASE', 'XXXXXXXX');
      define('USE_PCONNECT', 'false'); // use persistent connections?
      define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage
    
      // The next 2 "defines" are for SQL cache support.
      // For SQL_CACHE_METHOD, you can select from:  none, database, or file
      // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
      // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
      // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
      define('SQL_CACHE_METHOD', 'none'); 
      define('DIR_FS_SQL_CACHE', '/home/content/m/a/n/maneattractions/html/cache');
    
      if ($_GET['cPath']==12){define('STORE_STATUS',1);} 
    ?>

  10. #10
    Join Date
    Jun 2007
    Location
    Morocco_Canada
    Posts
    24
    Plugin Contributions
    0

    Default Re: Simple ZC gallery

    Hello

    Firstly I did all what is required and had it working very well, the only problem that I have is that the sold products can be shown in new products for november, in the main page.

    Any one have a solution for the products in the gallery category not to show anywhere else?

    Kinds

    Anir

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Simple Product Page Image Gallery/Viewer
    By Inxie in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 20 Sep 2012, 02:25 AM
  2. Looking for a simple gallery.
    By fw541c in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 23 Nov 2010, 07:04 AM
  3. Simple Gallery Solution
    By lucky__starre in forum General Questions
    Replies: 33
    Last Post: 29 Apr 2010, 02:43 AM
  4. Simple/HTML Image Gallery
    By MegamanX in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 10 Jan 2010, 06:35 PM
  5. Simple Gallery ?
    By NullMind in forum General Questions
    Replies: 3
    Last Post: 10 Apr 2008, 09:48 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