Thread: Snaf

Page 22 of 30 FirstFirst ... 122021222324 ... LastLast
Results 211 to 220 of 298
  1. #211
    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
    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**
    Quote Originally Posted by DivaVocals View Post
    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;}
    AT LAST a light at the end of the tunnel.. I found the issue and NOW things are working as they should.. I'm quoting my previous posts to try and help make following what I'm doing (or trying to do) a little easier..

    After reviewing all the SNAF code plus the changes made to the tpl_tabular_display.php file, I realized that the tableless code I was using has a small modification over the default version which has a BIG impact on the HTML output.. It appears that part of this code strips out the the divs which are supposed to replace the table, table rows, and table data tags and therefore affects the the row layout when viewing the product categories or other product listings in the "rows" view.

    Here's the code (quoted below) I used to covert the tpl_tabular_display.php to a tableless layout. I added the the ONE change which SNAF makes to this file to this code..

    Quote Originally Posted by rbarbour View Post
    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 issue with this code is on Line 22.. Once I changed Line 22 to read:

    Code:
    for($row=0; $row<sizeof($list_box_contents); $row++) {
    and added a little CSS to tidy things up

    Code:
    .tabTable {display: table;}
    .trRow {display: table-row;}
    
    .productListing-data, .productListing-heading/*, a.productListing-heading*/ {
        padding: .5em 0;
        display: table-cell;
        vertical-align: top;
    }
    
    a.productListing-heading {
        padding: 0em 0.5em;
    }
    
    .productListing-data h3, .listingDescription {
        margin: 0 0 1em .5em;
    }
    and now the rows view works as it should..

    Here's my FULL tpl_tabular_display.php file (I also removed the line break from this file)
    PHP Code:
    <?php
    /**
     * SNAF version 1.2
     * 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 id="<?php echo 'cat' $cPath 'Table'?>" class="tabTable">
    <?php
      
    for($row=0$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  class="trRow" <?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 'div'/*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
          
    }
        }
    ?>
      </div> <!--end trRow-->
    <?php
      
    }
    ?> 
    </div> <!--end tabTable-->


    I also removed some of the line breaks from the includes/modules/custom_template/product_listing.php file because they affected the grid view especially when I added the price and add to cart elements.


    Line 180
    Code:
    $lc_price = zen_get_products_display_price($listing->fields['products_id']);

    Line 212
    Code:
    $lc_button= zen_draw_form('cart_quantity', zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';

    Line 272
    Code:
    $lc_text = implode('', $product_contents);


    Now the rows and grid displays are all worked out!!


    I could use a little help to figure out a few final things though..


    Quote Originally Posted by DivaVocals View Post
    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; 4 Nov 2013 at 12:04 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.

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

    Default Re: Snaf

    A little CSS, and a few obscure (strange) admins settings and I've got these last things all worked out now.. Wanna thank niccol for the nudges, hints, and answers.. You are the BEST!!!

    Gonna go eat, grab some green tea, and maybe take a nap.. Was working most of the night (not on just this of course..) and have only had 3 hours of sleep.. Need to rejuvenate..


    Quote Originally Posted by DivaVocals View Post

    I could use a little help to figure out a few final things though..


    Quote Originally Posted by DivaVocals View Post
    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..
    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. #213
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Snaf

    I downloaded SNAf and when I go to extract the files it asks for a password. If I try and copy and paste certain files, for example in auto_loaders it won't.
    Anyone know why?

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

    Default Re: Snaf

    Quote Originally Posted by Annie_zaz View Post
    I downloaded SNAf and when I go to extract the files it asks for a password. If I try and copy and paste certain files, for example in auto_loaders it won't.
    Anyone know why?
    Nope.. Something unique going on with your computer.. Plus you haven't really given any details..

    Asks for password?? What EXACTLY are you doing when this happens. As you extracting th file locally?? using your hosts cPanel File Manager?? DETAILS

    "If I try and copy and paste certain files, for example in auto_loaders it won't."
    Copy and paste??? where? when, WHY??
    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. #215
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Snaf

    Ok, here's more detail.
    I am using xampp on my local computer. I download the snaf zip and then when I click extract these files
    I get the password prompt. See picture:
    Name:  snaf.jpg
Views: 208
Size:  36.4 KB
    So then because I can't extract the files I tried opening the folder and then copying and pasting the files individually to the directory.
    Most files do copy and paste but some don't.
    I hope this explains it better.

  6. #216
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Snaf

    Ok SOLVED. I basically downloaded winrar and it extracted all files without password prompt.
    I have been able to open other zip's with no problem..weird how it wouldn't do this one.
    Thanks to anyone who tried to help.

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

    Default Re: Snaf

    Quote Originally Posted by Annie_zaz View Post
    Ok SOLVED. I basically downloaded winrar and it extracted all files without password prompt.
    I have been able to open other zip's with no problem..weird how it wouldn't do this one.
    Thanks to anyone who tried to help.
    and as I said in my original answer this is NOT an issue with the SNAF module.. this is an issue with your LOCAL computer..
    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. #218
    Join Date
    Apr 2014
    Location
    Los Angeles
    Posts
    41
    Plugin Contributions
    0

    Default Re: Snaf

    Hi, I am getting errors trying to extract with winrar and winzip as well. Is the file okay?

  9. #219
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Snaf

    Well, with 1000+ downloads of the file I believe it is just fine. But try downloading it again and see how you get on. Perhaps the download was corrupted.

    Personally, I do not use windows so I can't comment on winrar and winzip problems. Probably someone else on the forum can confirm that tey have unzipped with these just fine. If you continue to have problems then post again and we will see what we can do.

    Quote Originally Posted by JenniferXO View Post
    Hi, I am getting errors trying to extract with winrar and winzip as well. Is the file okay?

  10. #220
    Join Date
    Apr 2014
    Location
    Los Angeles
    Posts
    41
    Plugin Contributions
    0

    Default Re: Snaf

    I downloaded the file 3 times. I'm fairly certain the file is corrupt. Perhaps a recent development. Is there an alternative download location?

 

 
Page 22 of 30 FirstFirst ... 122021222324 ... 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