Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2008
    Posts
    19
    Plugin Contributions
    0

    Default How Do I Fix This ?

    i want my prodcts to be spaced correctly check this out

    http://nahasshoes.com/catalog/index....d=test&x=0&y=0

    How do I get them to be evenly spaced and maybe even with a box around each image.

    I wanna say it might have to be done by changing the code below MIGHT BE SOMEWHERE AROUND ALIGN

    CODE BELOW
    ------------------------------------------------------------------

    $show_submit = zen_run_normal();

    $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page');

    if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == 'true' and $listing_split->number_of_rows > 0) {
    // bof: multiple products
    $how_many = 0;
    echo zen_draw_form('multiple_products_cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product'), 'post', 'enctype="multipart/form-data"');
    }

    // Begin Row Layout Header
    if (PRODUCT_LISTING_LAYOUT_STYLE == 'rows') { // For Column Layout (Grid Layout) add on module

    $zc_col_count_description = 0;
    for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
    switch ($column_list[$col]) {
    case 'PRODUCT_LIST_MODEL':
    $lc_text = TABLE_HEADING_MODEL;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_NAME':
    $lc_text = TABLE_HEADING_PRODUCTS;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_MANUFACTURER':
    $lc_text = TABLE_HEADING_MANUFACTURER;
    $lc_align = '';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_PRICE':
    $lc_text = TABLE_HEADING_PRICE;
    $lc_align = 'right';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_QUANTITY':
    $lc_text = TABLE_HEADING_QUANTITY;
    $lc_align = 'right';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_WEIGHT':
    $lc_text = TABLE_HEADING_WEIGHT;
    $lc_align = 'right';
    $zc_col_count_description++;
    break;
    case 'PRODUCT_LIST_IMAGE':
    $lc_text = TABLE_HEADING_IMAGE;
    $lc_align = 'center';
    $zc_col_count_description++;
    break;
    }

    if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
    $lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text);
    }

    $list_box_contents[0][$col] = array('align' => $lc_align,
    'params' => ' class="productListing-heading" nowrap="nowrap"',
    'text' => '' . $lc_text . '');
    }

    } // End Row Layout Header used in Column Layout (Grid Layout) add on module

    if ($listing_split->number_of_rows > 0) {
    $rows = 0;

    $column = 0; // Used for Column Layout (Grid Layout) add on module

    $listing = $db->Execute($listing_split->sql_query);
    while (!$listing->EOF) {

    if (PRODUCT_LISTING_LAYOUT_STYLE == 'rows') { // Used in Column Layout (Grid Layout) Add on module
    $rows++;

    if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
    $list_box_contents[$rows] = array('params' => 'class="product_Listing-even"');
    } else {
    $list_box_contents[$rows] = array('params' => 'class="product_Listing-odd"');
    }
    $cur_row = sizeof($list_box_contents) - 1;
    } // End of Conditional execution - only for row (regular style layout)

    $product_contents = array(); // Used For Column Layout (Grid Layout) Add on module

    for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
    $lc_align = '';

    switch ($column_list[$col]) {
    case 'PRODUCT_LIST_MODEL':
    $lc_align = '';
    $lc_text = '' . $listing->fields['products_model'] . '';
    break;
    case 'PRODUCT_LIST_NAME':
    $lc_align = '';
    if (isset($_GET['manufacturers_id'])) {
    $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a>';
    } else {
    $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a>';
    }
    break;
    case 'PRODUCT_LIST_MANUFACTURER':
    $lc_align = '';
    $lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>';
    break;
    case 'PRODUCT_LIST_PRICE':
    $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '';
    $lc_align = 'right';
    $lc_text = '' . $lc_price . '';

    // more info in place of buy now
    $lc_button = '';
    if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
    $lc_button = '';
    } else {
    if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
    $how_many++;
    $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=0 size=\"4\">";
    } else {
    $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a>';
    }
    }
    $the_button = $lc_button;
    $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
    $lc_text .= '' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);

    break;
    case 'PRODUCT_LIST_QUANTITY':
    $lc_align = 'right';
    $lc_text = '&nbsp;' . $listing->fields['products_quantity'] . '&nbsp;';
    break;
    case 'PRODUCT_LIST_WEIGHT':
    $lc_align = 'right';
    $lc_text = '&nbsp;' . $listing->fields['products_weight'] . '&nbsp;';
    break;
    case 'PRODUCT_LIST_IMAGE':
    $lc_align = 'center';
    if (isset($_GET['manufacturers_id'])) {
    $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT) . '</a>';
    } else {
    $lc_text = '&nbsp;<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT) . '</a>';
    }
    break;
    }

    $product_contents[] = $lc_text; // Used For Column Layout (Grid Layout) Option

    if (PRODUCT_LISTING_LAYOUT_STYLE == 'rows') {
    $list_box_contents[$rows][$col] = array('align' => $lc_align,
    'params' => ' class="productListing-data"',
    'text' => $lc_text);

    // Should we change the line above to read 'params' => 'class="productListing-data" valign="top"',
    // Or just use the modification via CSS to the class productListing-data ??

    }
    }

    // add description and match alternating colors
    if (PRODUCT_LIST_DESCRIPTION > 0 && (PRODUCT_LISTING_LAYOUT_STYLE == 'rows')) {
    $rows++;
    if ($extra_row == 1) {
    $list_box_description = "productListing-data-description-even";
    $extra_row=0;
    } else {
    $list_box_description = "productListing-data-description-odd";
    $extra_row=1;
    }
    $list_box_contents[$rows][] = array('params' => 'class="' . $list_box_description . '" colspan="' . $zc_col_count_description . '"',
    'text' => zen_trunc_string(zen_clean_html(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id'])), PRODUCT_LIST_DESCRIPTION));
    }

    // Following code will be executed only if Column Layout (Grid Layout) option is chosen

    if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
    $lc_text = implode('<br>', $product_contents);
    $list_box_contents[$rows][$column] = array('align' => 'center',
    'params' => 'class="productListing-data"',
    'text' => $lc_text);

    // Should we change the line above to read 'params' => 'class="productListing-data" valign="top"',
    // Or just use the modification via CSS to the class productListing-data ??

    $column ++;
    if ($column >= PRODUCT_LISTING_COLUMNS_PER_ROW) {
    $rows ++;
    $column = 0;
    }
    }
    // End of Code fragment for Column Layout (Grid Layout) option in add on module

    $listing->MoveNext();
    }
    $error_categories==false;
    } else {
    $list_box_contents = array();

    $list_box_contents[0] = array('params' => 'class="productListing-odd"');
    $list_box_contents[0][] = array('params' => 'class="productListing-data"',
    'text' => TEXT_NO_PRODUCTS);

    $error_categories = true;
    }

    if (($how_many > 0 and $show_submit == 'true' and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3) ) {
    $show_top_submit_button = 'true';
    }
    if (($how_many > 0 and $show_submit == 'true' and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART >= 2) ) {
    $show_bottom_submit_button = 'true';
    }
    ?>
    <?php require($template->get_template_dir('tpl_modules_product_listing.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_product_listing.php'); ?>

  2. #2
    Join Date
    Feb 2008
    Posts
    19
    Plugin Contributions
    0

    Default Re: How Do I Fix This ?

    figured it out changed to 30% now it is good

  3. #3
    Join Date
    Jan 2010
    Posts
    12
    Plugin Contributions
    0

    Default Re: How Do I Fix This ?

    Changed what t0 30%? I've been digging through all the forums, and have found so many bad answers related to the product heading tags generated in tabular_display.php. I couldn't get any padding at all around the product images, and the description was touching it on the left side. I've read thread after thread, and found no good answers. My best solution was to modify the php (which is always the clumsy way), as follows:

    PHP Code:
    <table width="100%" border="0" cellspacing="5" cellpadding="0" id="<?php echo 'cat' $cPath 'Table'?>" class="tabTable">
    (I changed the cellspacing on the table to 5). I can't believe this is a pervasive layout bug, but I have yet to find anyone with solid answers, aside from trying to write custom CSS classes, which I did over and over to no avail.

    Anyone else got some input on this one? I use the hell out of Zen-Cart, and deal with this issue in every new installation.

 

 

Similar Threads

  1. wHAT DOES THIS ERROR CODE MEAN AND HOW WOULD I FIX THIS?
    By Snaggle in forum General Questions
    Replies: 2
    Last Post: 15 Jun 2011, 10:27 PM
  2. Uh oh. How do I fix this....
    By JDog21 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 22 Jul 2010, 05:29 PM
  3. how do i fix this?
    By fimg in forum Installing on a Windows Server
    Replies: 8
    Last Post: 7 Dec 2007, 08:45 AM
  4. How to fix this
    By Mr.Art in forum General Questions
    Replies: 5
    Last Post: 27 May 2007, 02:35 AM
  5. How Do I Fix This
    By Adds in forum General Questions
    Replies: 3
    Last Post: 17 Oct 2006, 10:27 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