Page 4 of 4 FirstFirst ... 234
Results 31 to 35 of 35
  1. #31
    Join Date
    Apr 2011
    Posts
    383
    Plugin Contributions
    0

    Default Re: Seasonal Centerbox [support thread]

    Quote Originally Posted by swguy View Post
    See installation instructions step 6.
    https://www.thatsoftwareguy.com/zenc...l#installation
    woops sorry brain lapse on my part. Not use to have admin controls on mods

  2. #32
    Join Date
    Apr 2011
    Posts
    383
    Plugin Contributions
    0

    Default Re: Seasonal Centerbox [support thread]

    I am trying to have the seasonal box display 2 product per row on mobile with the bootstrap template.

    I looked at the modification from post #554 in the bootstrap threads but i am not finding a similar file for the seasonal centerbox.

    Code:
    @@ -36,14 +36,14 @@ if (is_array($list_box_contents) > 0 ) {
         //if (isset($list_box_contents[$row]['params'])) $params .= ' ' . $list_box_contents[$row]['params'];
     ?>
    
    -<div class="card-deck text-center">
    +<div class="card-deck text-center row row-cols-2">
     <?php
         for($col=0, $j=sizeof($list_box_contents[$row]); $col<$j; $col++) {
           $r_params = "";
           if (isset($list_box_contents[$row][$col]['params'])) $r_params .= ' ' . (string)$list_box_contents[$row][$col]['params'];
          if (isset($list_box_contents[$row][$col]['text'])) {
     ?>
    -    <?php echo '<div' . $r_params . '>' . $list_box_contents[$row][$col]['text'] .  '</div>'; ?>
    +    <?php echo '<span ' . $r_params . '>' . $list_box_contents[$row][$col]['text'] .  '</span>'; ?>
     <?php
           }
         }
    How can i accomplish the same thing with this mod?

    Thank you once again for your help

  3. #33
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,547
    Plugin Contributions
    81

    Default Re: Seasonal Centerbox [support thread]

    Check the module file where the $list_box_contents variable is set

  4. #34
    Join Date
    Apr 2011
    Posts
    383
    Plugin Contributions
    0

    Default Re: Seasonal Centerbox [support thread]

    Quote Originally Posted by numinix View Post
    Check the module file where the $list_box_contents variable is set
    There is no file for this mod in template/bootstrap/centerboxes.

    The only file named tpl_modules_seasonal.php in includes/templates/bootstrap/templates looks nothing like the others.

    here is the code

    Code:
    <?php
    /**
     * Module Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 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_modules_featured_products.php 2935 2006-02-01 11:12:40Z birdbrain $
     */
      $zc_show_seasonal = false;
      include(DIR_WS_MODULES . zen_get_module_directory('seasonal_index'));
    ?>
    
    <?php if ($zc_show_seasonal) { ?>
    <!-- bof: seasonal products  -->
    <div class="centerBoxWrapper" id="featuredProducts">
    <?php
    /**
     * require the list_box_content template to display the product
     */
      require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
    ?>
    </div>
    <!-- eof: seasonal products  -->
    <?php } ?>
    The other file with the variable in it ( i think) is in modules/bootstrap/seasonal_index.php.

    Code:
    <?php
    /**
     * kitbuilder module - prepares content for display
     *
     * @package modules
     * @copyright Copyright 2003-2007 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: featured_products.php 6424 2007-05-31 05:59:21Z ajeh $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die('Illegal Access');
    }
    
    // initialize vars
    $categories_products_id_list = '';
    $list_of_products = '';
    $seasonal_products_query = '';
    $display_limit = '';
    
    $zc_show_seasonal = false; 
    if (SEASONAL_CENTERBOX_CATEGORY != 0) {
       $zc_show_seasonal = true; 
    }
    
    if ($zc_show_seasonal) { 
    if ( (($manufacturers_id > 0 && $_GET['filter_id'] == 0) || $_GET['music_genre_id'] > 0 || $_GET['record_company_id'] > 0) || (!isset($new_products_category_id) || $new_products_category_id == '0') ) {
      $seasonal_products_query = "select distinct p.products_id, p.products_image, pd.products_name, p.master_categories_id
                               from (" . TABLE_PRODUCTS . " p
                               left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
                               where p.products_id = pd.products_id
                               and p.products_status = 1 
                               and p.master_categories_id = " . SEASONAL_CENTERBOX_CATEGORY . " 
                               and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
    } else {
      // get all products and cPaths in this subcat tree
      $productsInCategory = zen_get_categories_products_list( (($manufacturers_id > 0 && $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : $cPath), false, true, 0, $display_limit);
    
      if (is_array($productsInCategory) && sizeof($productsInCategory) > 0) {
        // build products-list string to insert into SQL query
        foreach($productsInCategory as $key => $value) {
          $list_of_products .= $key . ', ';
        }
        $list_of_products = substr($list_of_products, 0, -2); // remove trailing comma
        $seasonal_products_query = "select distinct p.products_id, p.products_image, pd.products_name, p.master_categories_id
                                    from (" . TABLE_PRODUCTS . " p
                                    left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id)
                                    where p.products_id = pd.products_id
                                    and p.products_status = 1 
                                    and p.master_categories_id = " . SEASONAL_CENTERBOX_CATEGORY . " 
                                    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                                    and p.products_id in (" . $list_of_products . ")";
      }
    }
    if ($seasonal_products_query != '') { 
         $seasonal_products = $db->ExecuteRandomMulti($seasonal_products_query, MAX_DISPLAY_SEASONAL_CENTERBOX);
      }
    
    $row = 0;
    $col = 0;
    $list_box_contents = array();
    $title = '';
    
    $num_products_count = ($seasonal_products_query == '') ? 0 : $seasonal_products->RecordCount();
    
    // show only when 1 or more
    
    if ($num_products_count > 0) {
      if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_SEASONAL_CENTERBOX || SHOW_PRODUCT_INFO_COLUMNS_SEASONAL_CENTERBOX == 0) {
        $col_width = floor(100/$num_products_count);
      } else {
        $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SEASONAL_CENTERBOX);
      }
      while (!$seasonal_products->EOF) {
        $products_price = zen_get_products_display_price($seasonal_products->fields['products_id']);
        if (!isset($productsInCategory[$seasonal_products->fields['products_id']])) $productsInCategory[$seasonal_products->fields['products_id']] = zen_get_generated_category_path_rev($seasonal_products->fields['master_categories_id']);
    
        $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContents card mb-3 p-3 text-center" id="centerBoxContentsFeatured"',
        'text' => (($seasonal_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($seasonal_products->fields['products_id']), 'cPath=' . $productsInCategory[$seasonal_products->fields['products_id']] . '&products_id=' . $seasonal_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $seasonal_products->fields['products_image'], $seasonal_products->fields['products_name'], IMAGE_SEASONAL_CENTERBOX_LISTING_WIDTH, IMAGE_SEASONAL_CENTERBOX_LISTING_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($seasonal_products->fields['products_id']), 'cPath=' . $productsInCategory[$seasonal_products->fields['products_id']] . '&products_id=' . $seasonal_products->fields['products_id']) . '">' . $seasonal_products->fields['products_name'] . '</a><br />' . $products_price);
    
        $col ++;
        if ($col > (SHOW_PRODUCT_INFO_COLUMNS_SEASONAL_CENTERBOX - 1)) {
          $col = 0;
          $row ++;
        }
        $seasonal_products->MoveNextRandom();
      }
    
      if ($seasonal_products->RecordCount() > 0) {
        if (isset($new_products_category_id) && $new_products_category_id !=0) {
          $category_title = zen_get_categories_name((int)$new_products_category_id);
          $title = '<h4 id="featuredCenterbox-card-header" class="centerBoxHeading card-header">' . TITLE_SEASONAL_CENTERBOX . ($category_title != '' ? ' - ' . $category_title : '') . '</h4>';
        } else {
          $title = '<h4 id="featuredCenterbox-card-header" class="centerBoxHeading card-header">' . TITLE_SEASONAL_CENTERBOX . '</h4>';
        }
        $zc_show_seasonal = true; 
      } else {
        $zc_show_seasonal = false; 
      }
    }
    }
    
    ?>

    Any ideas on how i can make this work please?

    Thank you

  5. #35
    Join Date
    Apr 2011
    Posts
    383
    Plugin Contributions
    0

    Default Re: Seasonal Centerbox [support thread]

    I could use some help .

    The modules was working fine then i switch categories to 0 to disable the module for awhile.

    I switch it back to categories 48 for example, however, i am getting a blank frame.

    I tried to remove and reinstall the plugin but no luck.

    It is on the main page of royal-fleur.com right above the deal of the week section.

    Anyone know how i can fix this?

    thank you for your help.

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. v157 ZX POS [Support Thread]
    By balihr in forum All Other Contributions/Addons
    Replies: 31
    Last Post: 6 Apr 2023, 10:06 PM
  2. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 AM
  3. v156 PWA, Offline support Push notifications addon [Support Thread]
    By perfumbg in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 May 2019, 02:27 PM
  4. ZJ Silver Support Thread
    By anthonyd in forum Addon Templates
    Replies: 220
    Last Post: 5 Nov 2010, 03:30 PM
  5. Centerbox problem: support needed...
    By sunny747 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 18 Apr 2007, 12:55 PM

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