Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Table Help Needed

    Hello I have the cross sell mod layout changed into a table, I have everything completed except I am having problems with the QTY box and the possition of the qty box and add to cart in the table, the second row goes into a third? Please take a look at the attachment and the website:
    http://www.pe-*--*-tla-*-ndp-*-lus.c...&products_id=1

    REMOVE: -*-


    ** EDITED *** Never ever post in a forum, email, newsletter etc. the zenid or zenAdminID or you will be doomed!!
    Attached Images Attached Images  
    Last edited by Ajeh; 3 Nov 2009 at 02:10 AM.

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,706
    Plugin Contributions
    12

    Default Re: Table Help Needed

    You've got html errors that are not helping. Fix those and reconsider the table layout. Divs are the better way to control a layout.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  3. #3
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: Table Help Needed

    Ill work on this tomorrow Ill use the html validator, its just a stock zen-cart with that mod installed. I tried Divs but then it even gets more funky with the layout, I will post it when its updated.

  4. #4
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: Table Help Needed

    Okay I removed 1 of the </form> and they layout went to normal :) BUT now the mod doesn't work correctly, where should I place the </form>.. I had it here, the mod worked 100% but the layout didn't now when I remove that it doesn't work correctly but the layout does :
    PHP Code:
    $myBuyNow '</form>'
    PHP Code:
    <?php
    /**
     * Cross Sell products
     *
     * Derived from:
     * Original Idea From Isaac Mualem [email protected] <mailto:[email protected]>
     * Portions Copyright (c) 2002 osCommerce
     * Complete Recoding From Stephen Walker [email protected]
     * Released under the GNU General Public License
     *
     * Adapted to Zen Cart by Merlin - Spring 2005
     * Reworked for Zen Cart v1.3.0  03-30-2006
     */

    // in case admin switches aren't added properly, assume default settings:
    if (!defined('MAX_DISPLAY_XSELL')) define('MAX_DISPLAY_XSELL',6);
    if (!
    defined('MIN_DISPLAY_XSELL')) define('MIN_DISPLAY_XSELL',1);
    if (!
    defined('XSELL_DISPLAY_PRICE')) define('XSELL_DISPLAY_PRICE','false');
    if (!
    defined('SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS')) define('SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS',2);

    // collect information on available cross-sell products for the current product-id
    if (isset($_GET['products_id']) && SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS ) {
      
    $xsell_query $db->Execute("select distinct p.products_id, p.products_image, pd.products_name
                                     from " 
    TABLE_PRODUCTS_XSELL " xp, " TABLE_PRODUCTS " p, " TABLE_PRODUCTS_DESCRIPTION " pd
                                     where xp.products_id = '" 
    $_GET['products_id'] . "'
                                      and xp.xsell_id = p.products_id
                                      and p.products_id = pd.products_id
                                      and pd.language_id = '" 
    $_SESSION['languages_id'] . "'
                                      and p.products_status = 1
                                     order by xp.sort_order asc limit " 
    MAX_DISPLAY_XSELL);
      
    $num_products_xsell $xsell_query->RecordCount();

      
    // don't display if less than the minimum amount set in Admin->Config->Minimum Values->Cross-Sell
      
    if ($num_products_xsell >= MIN_DISPLAY_XSELL && $num_products_xsell 0) {
    ?>
    <!-- xsell_products //-->
    <?php
    $row 
    0;
    $col 0;
    $list_box_contents = array();
    $title='';
    if (
    $num_products_xsell SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS==0) {
      
    $col_width floor(100/$num_products_xsell);
    } else {
      
    $col_width floor(100/SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS);
    }
    while (!
    $xsell_query->EOF) {
      
    $products_price zen_get_products_display_price($xsell_query->fields['products_id']);
      
    $xsell_query->fields['products_name'] = zen_get_products_name($xsell_query->fields['products_id']);
      
    //$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsCrossSell centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
      //'text' => '<a href="' . zen_href_link(zen_get_info_page($xsell_query->fields['products_id']), 'products_id=' . (int)$xsell_query->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $xsell_query->fields['products_image'], $xsell_query->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . zen_href_link(zen_get_info_page($xsell_query->fields['products_id']), 'products_id=' . $xsell_query->fields['products_id']) . '">' . $xsell_query->fields['products_name'] . '</a>' . (XSELL_DISPLAY_PRICE=='true'? '<br />'.zen_get_products_display_price($xsell_query->fields['products_id']):'') );

    // bof buy now buttons 
    $myBuyNow '';
    //$flag_show_product_info_in_cart_qty = 1;

    $myBuyNow .= zen_draw_form('cart_quantity'zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post''enctype="multipart/form-data"') . "\n";
    $myBuyNow .= 'QTY:' '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($xsell_query->fields['products_id'])) . '" maxlength="6" size="4" />' "\n";
    //$myBuyNow .= zen_get_products_quantity_min_units_display($xsell_query->fields['products_id']) . "\n";
    $myBuyNow .= zen_draw_hidden_field('products_id'$xsell_query->fields['products_id']);
    //      '<img alt="Aan winkelwagen toevoegen" class="cart-add" src="' .  $template->get_template_dir('my_cart_add.png', DIR_WS_TEMPLATE, $current_page_base,'images') . '/cart-add.gif" />';
    $myBuyNow .= zen_image_submit(BUTTON_IMAGE_IN_CARTBUTTON_IN_CART_ALT);
    //$myBuyNow .= (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($xsell_query->fields['products_id'])) ? '<p class="xsellProductsInCart">' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($xsell_query->fields['products_id']) . '</p>' : '');

    // eof buy now buttons
         
    $list_box_contents[$row][$col] = array('params' =>'class="grid_layout" id="crosswrapper"',
         
    'text' => '<a class="crossSellImageLink" href="' zen_href_link(zen_get_info_page($xsell_query->fields['products_id']), 'products_id=' $xsell_query->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $xsell_query->fields['products_image'], $xsell_query->fields['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a>' "\n" 
        
         
    '<table width="600px" style="border-bottom:2px #d9d9d9 solid">' "\n" .
      
    '<tr>' "\n" .
        
    '<td id="leftcrosscell"><a href="' zen_href_link(zen_get_info_page($xsell_query->fields['products_id']), 'products_id=' $xsell_query->fields['products_id']) . '">' $xsell_query->fields['products_name'] . '</a></td>' .
        
    '<td id="centralcrosscell">' $products_price '</td>' .
        
    '<td id="rightcrosscell" class="crossSellBuyNow">' $myBuyNow '</td>' .
      
    '</tr>' "\n" .
    '</table>' );
      
      
    $col ++;
      if (
    $col > (SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS -1)) {
        
    $col 0;
        
    $row ++;
      }
      
    $xsell_query->MoveNext();
    }
    // store data into array for display later where desired:
    $xsell_data $list_box_contents;
      }
    }
    '</div'
    ?>

  5. #5
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,706
    Plugin Contributions
    12

    Default Re: Table Help Needed

    I still see form problems and some missing escape characters in your JavaScript as part of the 21 errors on that page.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  6. #6
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: Table Help Needed

    Im not sure, because a div its coming up in the validator that all the <td> <div> <form> should be like <td <div <form they shouldbe closed no? This still wouldnt fix the problem I am having I need to fix the FORM relocate it correctly so it works and doesnt affect the layout

  7. #7
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,706
    Plugin Contributions
    12

    Default Re: Table Help Needed

    You're probably not going to like my advice, but here goes.

    You are not that far into setup and products so....

    I would reload 1.3.8a fresh and slowly start to get things working correctly as you may be complicating matters each time you change a php file.

    While you're at it, you need to check the tutorials for Override or Custom Template as you are using the classic template. The classic template will be overwritten if you upgrade and you will lose all your work.

    If you don't start with a solid foundation, the house will keep falling.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  8. #8
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: Table Help Needed

    Quote Originally Posted by dbltoe View Post
    You're probably not going to like my advice, but here goes.

    You are not that far into setup and products so....

    I would reload 1.3.8a fresh and slowly start to get things working correctly as you may be complicating matters each time you change a php file.

    While you're at it, you need to check the tutorials for Override or Custom Template as you are using the classic template. The classic template will be overwritten if you upgrade and you will lose all your work.

    If you don't start with a solid foundation, the house will keep falling.
    Thanks for your responses, I just installed this fresh zen-cart its my test store, I didnt rewrite the php file i got it from this thread:
    http://www.zen-cart.com/forum/showthread.php?t=75097

    Its a posted issue on there about the form but I dont know how to close it problem so it doesnt affect the layout, I can close it properly and the mod works but then the layout is all messed up, then if I try to relocate the closing of the form, the layout is how it suppose to be but the mod doesnt work correctly then.

  9. #9
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,706
    Plugin Contributions
    12

    Default Re: Table Help Needed

    Yep,
    Looks pretty buggy and I'm afraid I don't have the time to investigate right now.
    I may be using something like this in an upcoming site. If so, I'll be forced to look into it then.

    Which of the mods are you using? The one by yellow1912?
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  10. #10
    Join Date
    Feb 2008
    Posts
    569
    Plugin Contributions
    0

    Default Re: Table Help Needed

    sounds good, yes thats the mod i am using by yellow1912, what my idea is to have a category of "All Products" I will remove my attributes and put in the attributes I currenlt have in the ALL products, and then setup the cross sell with the main product and make the cross sell look like that is the attributes available (so old attributes will = cross sell) they will be able to add the cross sell items to the cart. There I will be able to update each product constantly, so no more need to worry about my attrributes no having a model number. It will make my store much more flexible and more up to date qty and price wise.

 

 

Similar Threads

  1. SQL code needed to update products table
    By ewramos in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 22 Feb 2011, 05:30 PM
  2. Table shipping help needed: price & weight question
    By thebeveragegourmet in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 5 Sep 2009, 09:17 PM
  3. 1033 [ table ] was created in a different version of MySQL - Help needed
    By dashequestrian in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 29 May 2009, 04:58 PM
  4. advice on shipping table costs needed please
    By toffee in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 10 Jun 2006, 04:03 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