Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    Default Attributes not rendering on page

    Every once and a while I get an order for an item without it's attributes specified.

    I cannot recreate the issue but from what i've been told by the customers, the attributes weren't there when they ordered.

    It's happening on different browsers and products.

    This issue just started happening within the last few weeks and never had before that for years.

    Any ideas on what may be causing this?

    Thanks in Advance.

    ~D

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Attributes not rendering on page

    Have you any information on the product such as the URL that is used that we could peek at?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    Default Re: Attributes not rendering on page

    Thanks Ajeh, I PMd you the link to the last item this happened to.

  4. #4
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    Default Re: Attributes not rendering on page

    Ajeh,

    I actually just figured out how it happened. I have a compare module that allows you to add the item to cart from the compare screen. This is how it's happening.

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Attributes not rendering on page

    I was about to tell you ... your compare program is allow this to happen ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    Default Re: Attributes not rendering on page

    Thanks for your time.

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Attributes not rendering on page

    Sure thing ... glad you have found the cause and posted the issue ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    Default Re: Attributes not rendering on page

    I'm using the function zen_has_product_attributes to determine which products can be added to cart or sent back to the product page. Is there something native I can use to determine if those attributes are required ?

    Thanks

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Attributes not rendering on page

    In the module for the Product Listing ... look at this section of code to see what all should be checked to determine Add to Cart vs buttons etc:
    Code:
            case 'PRODUCT_LIST_PRICE':
            $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
            $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 = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
            } else {
              if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
                if (
                    // not a hide qty box product
                    $listing->fields['products_qty_box_status'] != 0 &&
                    // product type can be added to cart
                    zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N'
                    &&
                    // product is not call for price
                    $listing->fields['product_is_call'] == 0
                    &&
                    // product is in stock or customers may add it to cart anyway
                    ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) {
                  $how_many++;
                }
                // hide quantity box
                if ($listing->fields['products_qty_box_status'] == 0) {
                  $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
                } else {
                  $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
                }
              } else {
    // qty box with add to cart button
                if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
                  $lc_button= zen_draw_form('cart_quantity', zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'products_id')) . '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" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
                } else {
                  $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
                }
              }
            }
            $the_button = $lc_button;
            $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
            $lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
            $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');
    
            break;
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    345
    Plugin Contributions
    0

    Default Re: Attributes not rendering on page

    This code switches the functionality based on the existence of the 'products_attributes_id'

    I was hoping there was something native that would also check the 'attributes_required' db column.

    I was thinking about bypassing attribute selection for items that didn't require specific attributes for product configuration when added to cart from the compare page.

    ie. Attributes that are more like add-ons would be bypassed.

    After thinking about it, I decided not to go that route.

    Thanks again!

 

 

Similar Threads

  1. Preview not rendering in 1.3.9g
    By kanine in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 11 Oct 2010, 11:09 AM
  2. Some CSS buttons not rendering
    By phatkodi in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 21 Jul 2008, 04:48 AM
  3. page not rendering (text only)
    By rustynails in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 7 Feb 2008, 12:07 PM
  4. Images not rendering
    By jparent in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 22 Feb 2007, 07:50 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