Thread: Snaf

Page 21 of 30 FirstFirst ... 111920212223 ... LastLast
Results 201 to 210 of 298
  1. #201
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Snaf

    Quote Originally Posted by DivaVocals View Post
    So I finally have hit a snag using SNAF.. I've always preferred this module of the Column Product Listings mod because Column Product Listing module only converts the category product listing into grid listings, whereas SNAF covers ALL products listings including the Specials, Feature, and New Products listings..

    The issue I've run into with SNAF is the tables used to create the grids.. It looks like code that drive this are in these files:
    includes/templates/custom_template/common/tpl_columnar_display.php
    includes/templates/custom_template/common/tpl_tabular_display.php

    I need to convert the tables to a CSS grid like the one used for the category listings in the Column Product Listings mod. Otherwise this mod will be a bit of a bear to deal with in responsive templates..

    I've been staring at the code in these two files hoping to "figure it out", but I am waving the white flag and admitting that I haven't a CLUE here.. Hoping that if not niccol, that some kind community member can help me with the changes I need to make..
    I prefer flexible product listing over both but that is here nor there.

    I have converted the tables for you (done previously):
    PHP Code:
    <?php
    /**
     * Common Template - tpl_tabular_display.php
     *
     * This file is used for generating tabular output where needed, based on the supplied array of table-cell contents.
     *
     * @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_tabular_display.php 3957 2006-07-13 07:27:06Z drbyte $
     */

    //print_r($list_box_contents);
      
    $cell_scope = (!isset($cell_scope) || empty($cell_scope)) ? 'col' $cell_scope;
      
    $cell_title = (!isset($cell_title) || empty($cell_title)) ? 'list' $cell_title;

    ?>
    <div width="100%" id="<?php echo 'cat' $cPath 'Table'?>" class="tabTable">
    <?php
      
    for($row=1$row<sizeof($list_box_contents); $row++) {
        
    $r_params "";
        
    $c_params "";
        if (isset(
    $list_box_contents[$row]['params'])) $r_params .= ' ' $list_box_contents[$row]['params'];
    ?>
      <div <?php echo $r_params?>>
    <?php
        
    for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
          
    $c_params "";
          
    $cell_type = ($row==0) ? 'div' 'div';
          if (isset(
    $list_box_contents[$row][$col]['params'])) $c_params .= ' ' $list_box_contents[$row][$col]['params'];
          if (isset(
    $list_box_contents[$row][$col]['align']) && $list_box_contents[$row][$col]['align'] != ''$c_params .= ' align="' $list_box_contents[$row][$col]['align'] . '"';
          if (
    $cell_type=='div'$c_params .= ' scope="' $cell_scope '" id="' $cell_title 'Cell' $row '-' $col.'"';
          if (isset(
    $list_box_contents[$row][$col]['text'])) {
    ?>
       <?php echo '<' $cell_type $c_params '>'?><?php echo $list_box_contents[$row][$col]['text'?><?php echo '</' $cell_type '>'  "\n"?>

    <?php
          
    }
        }
    ?>
    <br class="clearBoth" />
      </div>

    <?php
      
    }
    ?> 
    </div>
    This requires additional css to make work. I do not have a clean version but you can check the source code out here: www[.]zcadditions[.]com/9172013/index.php?main_page=index&cPath=12_13

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

    Default Re: Snaf

    I appreciate the hand.. I prefer SNAF because while I know (based on the author) that "Flexible Product Listing" is very well written, my understanding is that "Flexible Product Listing" only applies a grid layout option to the product category listings. SNAF on the other hand also allows me to apply a grid layout to the Specials, New Products, All Products, and Featured Product listings as well.

    That said, not sure if the change to the includes/templates/custom_template/common/tpl_tabular_display.php alone will work with SNAF.

    SNAF makes modifications to both of these files:
    includes/templates/custom_template/common/tpl_columnar_display.php
    includes/templates/custom_template/common/tpl_tabular_display.php

    Your posted edit to the includes/templates/custom_template/common/tpl_tabular_display.php is based on the default version.. the SNAF version of this file only makes one small edit to this file.. I've combined it with your edits and this is the result (SNAF changes are highlighted in red):
    Code:
    <?php
    /**
     * Common Template - tpl_tabular_display.php
     *
     * This file is used for generating tabular output where needed, based on the supplied array of table-cell contents.
     *
     * @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_tabular_display.php 3957 2006-07-13 07:27:06Z drbyte $
     */
    
    //print_r($list_box_contents);
      $cell_scope = (!isset($cell_scope) || empty($cell_scope)) ? 'col' : $cell_scope;
      $cell_title = (!isset($cell_title) || empty($cell_title)) ? 'list' : $cell_title;
    
    ?>
    <div width="100%" id="<?php echo 'cat' . $cPath . 'Table'; ?>" class="tabTable">
    <?php
      for($row=1; $row<sizeof($list_box_contents); $row++) {
        $r_params = "";
        $c_params = "";
        if (isset($list_box_contents[$row]['params'])) $r_params .= ' ' . $list_box_contents[$row]['params'];
    ?>
      <div <?php echo $r_params; ?>>
    <?php
        for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
          $c_params = "";
          $cell_type = ($row==0) ? 'div' : 'div';
    
    if ($current_listing_style == 'columns') $cell_type = 'td'; /*SNAF CHANGES*/
          if (isset($list_box_contents[$row][$col]['params'])) $c_params .= ' ' . $list_box_contents[$row][$col]['params'];
          if (isset($list_box_contents[$row][$col]['align']) &&  $list_box_contents[$row][$col]['align'] != '') $c_params .= ' align="' .  $list_box_contents[$row][$col]['align'] . '"';
          if ($cell_type=='div') $c_params .= ' scope="' . $cell_scope . '" id="' . $cell_title . 'Cell' . $row . '-' . $col.'"';
          if (isset($list_box_contents[$row][$col]['text'])) {
    ?>
       <?php echo '<' . $cell_type . $c_params . '>'; ?><?php  echo $list_box_contents[$row][$col]['text'] ?><?php echo '</' .  $cell_type . '>'  . "\n"; ?>
    
    <?php
          }
        }
    ?>
    <br class="clearBoth" />
      </div>
    
    <?php
      }
    ?> 
    </div>
    I'm assuming that logically, this change should look like this to work with your edits:
    Code:
    if ($current_listing_style == 'columns') $cell_type = 'div'; /*SNAF CHANGES*/
    However the listing grids for Specials, New Products, All Products, and Featured Product listings in SNAF comes from the changes to the includes/templates/custom_template/common/tpl_columnar_display.php file. This is the file with the major SNAF changes, and it's the one I'm unsure of how to convert..

    Code:
    <?php
    /**
     * Common Template - tpl_columnar_display.php
     *
     * This file is used for generating tabular output where needed, based on the supplied array of table-cell contents.
     *
     * @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_columnar_display.php 3157 2006-03-10 23:24:22Z drbyte $
     */
    
    ?>
    <?php
      if ($title) {
      ?>
    <?php echo $title; ?>
    <?php
     }
     ?>
      <div class="centerBoxWrapperContents">
    <table width="100%" align="center" cellpadding="1" cellspacing="15" border="0">
    
    <?php
    if (is_array($list_box_contents) > 0 ) {
    
    $MaxCol=0;
     for($row=0;$row<sizeof($list_box_contents);$row++) {
        $params = "";
        //if (isset($list_box_contents[$row]['params'])) $params .= ' ' . $list_box_contents[$row]['params'];
    ?>
    <tr>
    <?php
        for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
          $r_params = "";
          if (isset($list_box_contents[$row][$col]['params'])) $r_params .= ' ' . (string)$list_box_contents[$row][$col]['params'];
         $r_params = str_replace(" back", "", $r_params);
         $r_params = str_replace("50", "100", $r_params);
         $r_params = str_replace("33", "100", $r_params);
         
         // bof: Replace all widths with 100% for Column Divider Pro
         $startpos = strpos($r_params, "width:");
         if ($startpos != false) {
            $endpos = strpos($r_params, ";", $startpos);
            $res = substr($r_params, $startpos, ($endpos - $startpos ));
            $r_params = str_replace($res, "width:100%", $r_params);
         }
         // eof: Replace all widths with 100% for Column Divider Pro
         
         if (isset($list_box_contents[$row][$col]['text'])) {
    ?>
        <?php 
        echo '<td width="'. (intval($col_width) - 0.5) .'%" align="center" valign="top"><div' . $r_params . '>' . $list_box_contents[$row][$col]['text'] .  '</div></td>' . "\n";
         ?>
        <?php if ($row == 0 && $col < (sizeof($list_box_contents[$row]) - 1)) {
                echo '<td class="vDotLine" rowspan="' . ((sizeof($list_box_contents))*2) . '"></td>' . "\n";
                  $MaxCol += 1;
              }
    
          }
        }
    ?>
    
    </tr>
    
    <?php 
        if ($row < (sizeof($list_box_contents)-1)) {?>
    <tr>
        <?php    for($col=0;$col<($MaxCol + 1);$col++) {
          echo '<td class="hDotLine"></td>';
        } ?>
    </tr>
    <?php    }
        ?>
    
    
    <?php
      }
    }
    ?>
    </table>
     </div>
    Quote Originally Posted by rbarbour View Post
    I prefer flexible product listing over both but that is here nor there.

    I have converted the tables for you (done previously):


    This requires additional css to make work. I do not have a clean version but you can check the source code out here: www[.]zcadditions[.]com/9172013/index.php?main_page=index&cPath=12_13
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

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

    Default Re: Snaf

    So I've made some progress, but I'm not quite there yet.. I have incorporated the Column Divider Pro module with SNAF, and the column dividers are not behaving EXACTLY as they should with the CSS tables and I'm puzzled how to fix it.. The horizontal dividers is repeated 4 times, and I cannot get the vertical dividers to work just on the between the inner cells.. (my current edit only displays them on the left -- I commented out the code which is supposed to display it between cells because it didn't work) You can see my progress here:
    http://eitestsite(dot)eyeitalia(dot)...e=products_all

    Here's my modified includes/templates/custom_template/common/tpl_columnar_display.php file and the CSS to support my changes:
    Supporting CSS
    Code:
    .vDotLine
    {
        background-color: transparent;
        background-image: url(../images/delim_v.gif);
        background-repeat: repeat-y;
        background-attachment: scroll;
        width: 20px;
        /*font-size: 1px;*/
    }
    
    .hDotLine
    {
        background-image: url(../images/delim_v.gif);
        padding:1px 0;
    }
    
    .tabTable {display: table;padding-left: 20px;/*font-size: 8pt;*/}
    .trRow {display: table-row;}
    .tdContent {display: table-cell;padding: 5px 8px;}
    tpl_columnar_display.php changes
    Code:
    <?php
    /**
     * Common Template - tpl_columnar_display.php
     *
     * This file is used for generating tabular output where needed, based on the supplied array of table-cell contents.
     *
     * @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_columnar_display.php 3157 2006-03-10 23:24:22Z drbyte $
     */
    
    ?>
    <?php
      if ($title) {
      ?>
    <?php echo $title; ?>
    <?php
     }
     ?>
      <div class="centerBoxWrapperContents">
    <div class="tabTable">
    
    <?php
    if (is_array($list_box_contents) > 0 ) {
    
    $MaxCol=0;
     for($row=0;$row<sizeof($list_box_contents);$row++) {
        $params = "";
        //if (isset($list_box_contents[$row]['params'])) $params .= ' ' . $list_box_contents[$row]['params'];
    ?>
    <div class="trRow">
    <?php
        for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
          $r_params = "";
          if (isset($list_box_contents[$row][$col]['params'])) $r_params .= ' ' . (string)$list_box_contents[$row][$col]['params'];
         $r_params = str_replace(" back", "", $r_params);
         $r_params = str_replace("50", "100", $r_params);
         $r_params = str_replace("33", "100", $r_params);
         
         // bof: Replace all widths with 100% for Column Divider Pro
         $startpos = strpos($r_params, "width:");
         if ($startpos != false) {
            $endpos = strpos($r_params, ";", $startpos);
            $res = substr($r_params, $startpos, ($endpos - $startpos ));
            $r_params = str_replace($res, "width:100%", $r_params);
         }
         // eof: Replace all widths with 100% for Column Divider Pro
         
         if (isset($list_box_contents[$row][$col]['text'])) {
    ?>
        <?php 
        echo '<div class="tdContent vDotLine" style="width:'. (intval($col_width) - 0.5) .'%">' . $list_box_contents[$row][$col]['text'] .  '</div>' . "\n";
         ?>
        <?php if ($row == 0 && $col < (sizeof($list_box_contents[$row]) - 1)) {
    //            echo '<div class="tdContent vDotLine"></div>' . "\n";
                  $MaxCol += 1;
              }
    
          }
        }
    ?>
    
    </div> <!--end trRow-->
    
    <?php 
        if ($row < (sizeof($list_box_contents)-1)) {?>
    <div class="trRow">
        <?php    for($col=0;$col<($MaxCol + 1);$col++) {
          echo '<div class="tdContent hDotLine"></div>';
        } ?>
    </div> <!--end trRow-->
    <?php    }
        ?>
    
    
    <?php
      }
    }
    ?>
    </div> <!--end table-->
     </div>


    Quote Originally Posted by DivaVocals View Post
    I appreciate the hand.. I prefer SNAF because while I know (based on the author) that "Flexible Product Listing" is very well written, my understanding is that "Flexible Product Listing" only applies a grid layout option to the product category listings. SNAF on the other hand also allows me to apply a grid layout to the Specials, New Products, All Products, and Featured Product listings as well.

    That said, not sure if the change to the includes/templates/custom_template/common/tpl_tabular_display.php alone will work with SNAF.

    SNAF makes modifications to both of these files:
    includes/templates/custom_template/common/tpl_columnar_display.php
    includes/templates/custom_template/common/tpl_tabular_display.php

    Your posted edit to the includes/templates/custom_template/common/tpl_tabular_display.php is based on the default version.. the SNAF version of this file only makes one small edit to this file.. I've combined it with your edits and this is the result (SNAF changes are highlighted in red):
    Code:
    <?php
    /**
     * Common Template - tpl_tabular_display.php
     *
     * This file is used for generating tabular output where needed, based on the supplied array of table-cell contents.
     *
     * @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_tabular_display.php 3957 2006-07-13 07:27:06Z drbyte $
     */
    
    //print_r($list_box_contents);
      $cell_scope = (!isset($cell_scope) || empty($cell_scope)) ? 'col' : $cell_scope;
      $cell_title = (!isset($cell_title) || empty($cell_title)) ? 'list' : $cell_title;
    
    ?>
    <div width="100%" id="<?php echo 'cat' . $cPath . 'Table'; ?>" class="tabTable">
    <?php
      for($row=1; $row<sizeof($list_box_contents); $row++) {
        $r_params = "";
        $c_params = "";
        if (isset($list_box_contents[$row]['params'])) $r_params .= ' ' . $list_box_contents[$row]['params'];
    ?>
      <div <?php echo $r_params; ?>>
    <?php
        for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
          $c_params = "";
          $cell_type = ($row==0) ? 'div' : 'div';
    
    if ($current_listing_style == 'columns') $cell_type = 'td'; /*SNAF CHANGES*/
          if (isset($list_box_contents[$row][$col]['params'])) $c_params .= ' ' . $list_box_contents[$row][$col]['params'];
          if (isset($list_box_contents[$row][$col]['align']) &&  $list_box_contents[$row][$col]['align'] != '') $c_params .= ' align="' .  $list_box_contents[$row][$col]['align'] . '"';
          if ($cell_type=='div') $c_params .= ' scope="' . $cell_scope . '" id="' . $cell_title . 'Cell' . $row . '-' . $col.'"';
          if (isset($list_box_contents[$row][$col]['text'])) {
    ?>
       <?php echo '<' . $cell_type . $c_params . '>'; ?><?php  echo $list_box_contents[$row][$col]['text'] ?><?php echo '</' .  $cell_type . '>'  . "\n"; ?>
    
    <?php
          }
        }
    ?>
    <br class="clearBoth" />
      </div>
    
    <?php
      }
    ?> 
    </div>
    I'm assuming that logically, this change should look like this to work with your edits:
    Code:
    if ($current_listing_style == 'columns') $cell_type = 'div'; /*SNAF CHANGES*/
    However the listing grids for Specials, New Products, All Products, and Featured Product listings in SNAF comes from the changes to the includes/templates/custom_template/common/tpl_columnar_display.php file. This is the file with the major SNAF changes, and it's the one I'm unsure of how to convert..

    Code:
    <?php
    /**
     * Common Template - tpl_columnar_display.php
     *
     * This file is used for generating tabular output where needed, based on the supplied array of table-cell contents.
     *
     * @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_columnar_display.php 3157 2006-03-10 23:24:22Z drbyte $
     */
    
    ?>
    <?php
      if ($title) {
      ?>
    <?php echo $title; ?>
    <?php
     }
     ?>
      <div class="centerBoxWrapperContents">
    <table width="100%" align="center" cellpadding="1" cellspacing="15" border="0">
    
    <?php
    if (is_array($list_box_contents) > 0 ) {
    
    $MaxCol=0;
     for($row=0;$row<sizeof($list_box_contents);$row++) {
        $params = "";
        //if (isset($list_box_contents[$row]['params'])) $params .= ' ' . $list_box_contents[$row]['params'];
    ?>
    <tr>
    <?php
        for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
          $r_params = "";
          if (isset($list_box_contents[$row][$col]['params'])) $r_params .= ' ' . (string)$list_box_contents[$row][$col]['params'];
         $r_params = str_replace(" back", "", $r_params);
         $r_params = str_replace("50", "100", $r_params);
         $r_params = str_replace("33", "100", $r_params);
         
         // bof: Replace all widths with 100% for Column Divider Pro
         $startpos = strpos($r_params, "width:");
         if ($startpos != false) {
            $endpos = strpos($r_params, ";", $startpos);
            $res = substr($r_params, $startpos, ($endpos - $startpos ));
            $r_params = str_replace($res, "width:100%", $r_params);
         }
         // eof: Replace all widths with 100% for Column Divider Pro
         
         if (isset($list_box_contents[$row][$col]['text'])) {
    ?>
        <?php 
        echo '<td width="'. (intval($col_width) - 0.5) .'%" align="center" valign="top"><div' . $r_params . '>' . $list_box_contents[$row][$col]['text'] .  '</div></td>' . "\n";
         ?>
        <?php if ($row == 0 && $col < (sizeof($list_box_contents[$row]) - 1)) {
                echo '<td class="vDotLine" rowspan="' . ((sizeof($list_box_contents))*2) . '"></td>' . "\n";
                  $MaxCol += 1;
              }
    
          }
        }
    ?>
    
    </tr>
    
    <?php 
        if ($row < (sizeof($list_box_contents)-1)) {?>
    <tr>
        <?php    for($col=0;$col<($MaxCol + 1);$col++) {
          echo '<td class="hDotLine"></td>';
        } ?>
    </tr>
    <?php    }
        ?>
    
    
    <?php
      }
    }
    ?>
    </table>
     </div>
    Last edited by DivaVocals; 3 Nov 2013 at 06:42 AM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

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

    Default Re: Snaf

    Whoops.. my bad.. it looks like all the changes I'm trying to work out are related to the Column Divider Pro module not SNAF.. let me move this to the right place..

    Quote Originally Posted by DivaVocals View Post
    So I've made some progress, but I'm not quite there yet.. I have incorporated the Column Divider Pro module with SNAF, and the column dividers are not behaving EXACTLY as they should with the CSS tables and I'm puzzled how to fix it.. The horizontal dividers is repeated 4 times, and I cannot get the vertical dividers to work just on the between the inner cells.. (my current edit only displays them on the left -- I commented out the code which is supposed to display it between cells because it didn't work) You can see my progress here:
    http://eitestsite(dot)eyeitalia(dot)...e=products_all

    Here's my modified includes/templates/custom_template/common/tpl_columnar_display.php file and the CSS to support my changes:
    Supporting CSS
    Code:
    .vDotLine
    {
        background-color: transparent;
        background-image: url(../images/delim_v.gif);
        background-repeat: repeat-y;
        background-attachment: scroll;
        width: 20px;
        /*font-size: 1px;*/
    }
    
    .hDotLine
    {
        background-image: url(../images/delim_v.gif);
        padding:1px 0;
    }
    
    .tabTable {display: table;padding-left: 20px;/*font-size: 8pt;*/}
    .trRow {display: table-row;}
    .tdContent {display: table-cell;padding: 5px 8px;}
    tpl_columnar_display.php changes
    Code:
    <?php
    /**
     * Common Template - tpl_columnar_display.php
     *
     * This file is used for generating tabular output where needed, based on the supplied array of table-cell contents.
     *
     * @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_columnar_display.php 3157 2006-03-10 23:24:22Z drbyte $
     */
    
    ?>
    <?php
      if ($title) {
      ?>
    <?php echo $title; ?>
    <?php
     }
     ?>
      <div class="centerBoxWrapperContents">
    <div class="tabTable">
    
    <?php
    if (is_array($list_box_contents) > 0 ) {
    
    $MaxCol=0;
     for($row=0;$row<sizeof($list_box_contents);$row++) {
        $params = "";
        //if (isset($list_box_contents[$row]['params'])) $params .= ' ' . $list_box_contents[$row]['params'];
    ?>
    <div class="trRow">
    <?php
        for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
          $r_params = "";
          if (isset($list_box_contents[$row][$col]['params'])) $r_params .= ' ' . (string)$list_box_contents[$row][$col]['params'];
         $r_params = str_replace(" back", "", $r_params);
         $r_params = str_replace("50", "100", $r_params);
         $r_params = str_replace("33", "100", $r_params);
         
         // bof: Replace all widths with 100% for Column Divider Pro
         $startpos = strpos($r_params, "width:");
         if ($startpos != false) {
            $endpos = strpos($r_params, ";", $startpos);
            $res = substr($r_params, $startpos, ($endpos - $startpos ));
            $r_params = str_replace($res, "width:100%", $r_params);
         }
         // eof: Replace all widths with 100% for Column Divider Pro
         
         if (isset($list_box_contents[$row][$col]['text'])) {
    ?>
        <?php 
        echo '<div class="tdContent vDotLine" style="width:'. (intval($col_width) - 0.5) .'%">' . $list_box_contents[$row][$col]['text'] .  '</div>' . "\n";
         ?>
        <?php if ($row == 0 && $col < (sizeof($list_box_contents[$row]) - 1)) {
    //            echo '<div class="tdContent vDotLine"></div>' . "\n";
                  $MaxCol += 1;
              }
    
          }
        }
    ?>
    
    </div> <!--end trRow-->
    
    <?php 
        if ($row < (sizeof($list_box_contents)-1)) {?>
    <div class="trRow">
        <?php    for($col=0;$col<($MaxCol + 1);$col++) {
          echo '<div class="tdContent hDotLine"></div>';
        } ?>
    </div> <!--end trRow-->
    <?php    }
        ?>
    
    
    <?php
      }
    }
    ?>
    </div> <!--end table-->
     </div>
    Last edited by DivaVocals; 3 Nov 2013 at 07:37 AM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

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

    Default Re: Snaf

    Okay.. so for now I'm dropping CDP stuff for now.. Too much work for very little gain.. If I figured it out later then so be it and I will share that revelation if I do..

    In the meantime I've got one last thing to work through with SNAF. Column views work JUST fine.. Rows views do not.

    So looking at my example: http://eitestsite(dot)eyeitalia(dot)...e=products_all

    If you use the button on the listing page to switch the view to rows, things are not laying out correctly..

    So far I made this change:
    Code:
    .productListing-data, .productListing-heading {
        padding: .5em 0;
        display: table-cell;
    }
    This as least fixed it so that things would at least line up in rows.. But I am stumped how I would go about fixing the spacing issues.. I get I may have to add more classes and IDs, but I am confused/stumped which files to edit..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  6. #206
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Snaf

    Quote Originally Posted by DivaVocals View Post

    So far I made this change:
    Code:
    .productListing-data, .productListing-heading {
        padding: .5em 0;
        display: table-cell;
    }
    Instead of table-cell try float:left;

    You may need to do more than that and add further classses but try that first.

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

    Default Re: Snaf

    Quote Originally Posted by niccol View Post
    Instead of table-cell try float:left;

    You may need to do more than that and add further classses but try that first.
    Nick you are a doll..

    Okay so that at least got things to things to align vertically.. But the spacing is still wrong, and I do know that I need to add more classes/IDs to help fix things up, but I'm still quite clueless where.. I have been using the developers toolkit to help narrow things down, but I am nowhere close to finding the "right" files..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

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

    Default Re: Snaf

    Quote Originally Posted by DivaVocals View Post
    Nick you are a doll..

    Okay so that at least got things to things to align vertically.. But the spacing is still wrong, and I do know that I need to add more classes/IDs to help fix things up, but I'm still quite clueless where.. I have been using the developers toolkit to help narrow things down, but I am nowhere close to finding the "right" files..
    Spoke too soon.. float:left; only worked on some rows.. not all..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

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

    Default Re: Snaf

    Okay.. still plugging away at this.. Still have had NO LUCK in fixing the look of the rows view.. I know I could make it work by using the following:
    1. display: table;
    2. display: table-row;
    3. display: table-cell;


    I know I need to add additional containers so that I can add the required classes/IDs to use these two elements:

    1. display: table;
    2. display: table-row;


    Just don't know where/how to accomplish this.. Everything points back to a change that needs to be made in the includes/modules/YOUR_TEMPLATE/product_listing.php file.. Just have no clue WHAT I need to change.. **sigh**

    ============================================

    In the meantime I've run across something else that I STUMPED how to execute..

    So in Configuration > Product Listing

    I changed the sort order of the displayed content to the following order:

    1. product image (Display Product Image)
    2. product name (Display Product Name)
    3. price/add to cart (Display Product Price/Add to Cart)


    Unfortunately the "Display Product Name" option also includes the description.. In the grid layout, I'd like to be able to to get the product name to appear above the image and the description to appear below.

    Also I'd like to know how to make the "add to cart" button appear below applicable items in the listing and NOT use the top and bottom "add selected products to cart" button.. Similar to this site: https://www(dot)ckrccrawlers(dot)com/specials.html. I thought this might be an admin setting.. but darned if I know what it is..
    Last edited by DivaVocals; 3 Nov 2013 at 05:46 PM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

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

    Default Re: Snaf

    Just wanted to add one more thing.. I KNOW that this is what the HTML output and CSS needs to look like to get the rows view to align correctly.. Still cannot see how to add the parts in red..

    Code:
    <div class="tabTable">
    
    <div class="trRow">
    <div class="productListing-heading"> … </div> <div class="productListing-heading"> … </div> <div class="productListing-heading"> … </div>
    </div> <div class="trRow">
    <div class="productListing-data"> … </div> <div class="productListing-data"> … </div> <div class="productListing-data"> … </div>
    </div>
    </div>
    Code:
    .tabTable {display: table;}
    .trRow {table-row;}
    .productListing-data, .productListing-heading {padding: .5em 0;display: table-cell;}
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 
Page 21 of 30 FirstFirst ... 111920212223 ... LastLast

Similar Threads

  1. SNAF and Set number dropdown not working
    By DeeL in forum General Questions
    Replies: 0
    Last Post: 2 Apr 2013, 02:03 AM
  2. styling the row layout while using snaf
    By bn17311 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Dec 2012, 07:44 PM
  3. SNAF not working with aBagon red template??
    By Johnnycopilot in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 3 Apr 2012, 08:15 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