Results 1 to 10 of 427

Threaded View

  1. #34
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: New add-on "product type book" for ZC 1.5

    Hi
    About the filters.
    I think the filters , always filters all authors, series, etc... even if they don't have a book associated.

    But there's a option, on listing, to display books out of stock from authors, etc...

    But out of stock is different from a book id that doesn't exist anymore....

    I've done this primary simple thing, to just filter series that has books associated. I think this makes sense, but probably I' missing something.

    PHP Code:
    $bookx_filter_values_query 'SELECT DISTINCT bs.bookx_series_id, bsd.series_name, be.bookx_series_id
                                      FROM ' 
    TABLE_PRODUCT_BOOKX_SERIES ' bs
                                      LEFT JOIN ' 
    TABLE_PRODUCT_BOOKX_EXTRA ' be ON bs.bookx_series_id = be.bookx_series_id   
                                      LEFT JOIN ' 
    TABLE_PRODUCT_BOOKX_SERIES_DESCRIPTION ' bsd ON bs.bookx_series_id = bsd.bookx_series_id AND bsd.languages_id = "' . (int)$_SESSION['languages_id'] . '"'
                                    
    . (!empty($extra_filter_query_parts['join_multi_filter']) ? $extra_filter_query_parts['join_multi_filter'] . ' ON be.bookx_series_id = bs.bookx_series_id ' '')
                                    . 
    bookx_assemble_filter_extra_join($extra_filter_query_parts['join'], array('series'))
                                  . 
    ' WHERE 1 ' bookx_assemble_filter_extra_where($extra_filter_query_parts['where'], array('series'))
                                  . 
    ' ORDER by bs.series_sort_order, bsd.series_name';

        
    $bookx_series $db->Execute $bookx_filter_values_query ); 
    And on the while loop

    PHP Code:
    while ( ! $bookx_series->EOF ) {
                
                if (
    $bookx_series->fields['bookx_series_id'] !='') {
                    
                    
    $bookx_series_name = ((strlen $bookx_series->fields ['series_name'] ) > ( int ) BOOKX_MAX_DISPLAY_FILTER_DROPDOWN_LEN) ? substr $bookx_series->fields ['series_name'], 0, ( int ) BOOKX_MAX_DISPLAY_FILTER_DROPDOWN_LEN ) . '..' $bookx_series->fields ['series_name']);
                
    $bookx_series_array [] = array (
                        
    'id' => $bookx_series->fields ['bookx_series_id'],
                        
    'text' => $bookx_series_name
                
    );
                }
                
                
    $bookx_series->MoveNext ();
            } 

    I think this makes more sense ? , or could be a future to have in a configuration option....to list everything even if there's no books anymore.
    But personalty, I think, that it's a lot of "dead" links for a customer.

    Another nice feature, would be a admin routine, upon admin click, to delete all series, etc... that don't have books anymore.
    Last edited by mesnitu; 28 May 2016 at 09:49 AM.
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

 

 

Similar Threads

  1. Why "No, Normal Shipping Rules" option for a "Product - Free Shipping" type?
    By ilikemike in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 31 Dec 2011, 12:34 AM
  2. Replies: 5
    Last Post: 11 Sep 2009, 04:51 AM
  3. Different "Sold Out" images for each product type
    By Starlyn in forum Setting Up Categories, Products, Attributes
    Replies: 13
    Last Post: 20 Mar 2009, 10:37 PM
  4. Remove "Add: [ ]" and "Add selected products to cart" from product pages? possible?
    By edwardtilbury in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 Sep 2008, 03:13 AM
  5. "Array()" line on "Update Address Book" page
    By vera in forum Managing Customers and Orders
    Replies: 10
    Last Post: 22 Sep 2006, 03:06 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR