Page 1 of 4 123 ... LastLast
Results 1 to 10 of 40
  1. #1
    Join Date
    Jun 2010
    Posts
    2
    Plugin Contributions
    0

    Default display product attributes on checkout payment page

    I would really appreciate if anyone can help here. i have a product that is going to be billed monthly if a customer opts in. There is an attribute setup on the product info page as a checkbox that says "ship this product monthly?" If the customer checks this box, the attribute is output to the shopping cart page below the product image. (ship this product monthly? Yes)

    I need to have this attribute displayed on the cart payment page. I have gone into the shopping cart page to try and snag the php that appears to call the attribute to see if i could just place it on the payment page. no luck.

  2. #2
    Join Date
    Sep 2011
    Posts
    86
    Plugin Contributions
    0

    Default Re: display product attributes on checkout payment page

    I found this old thread from 2006.

    I do not know if it still works for ver.1.3.9, I too would love to have this work on my checkout page only as well.

    Could someone please look at this with zencart experience and let us know if this would work in ver 1.3.9

    >>>>>>>>>>> includes/module/pages/shopping_cart/header_php.php <<<<<<<<<<<<<<
    line 93 for me:
    change

    Code:
    $attributes = "SELECT popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefixto

    Code:
    $attributes = "SELECT popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.attributes_imageline 123 for me:
    after

    Code:
    $attrArray[$option]['price_prefix'] = $attributes_values->fields['price_prefix'];Add:

    Code:
    $attrArray[$option]['attributes_image'] = $attributes_values->fields['attributes_image'];
    >>>>>>>>>>>> templates/template_default/templates/tpl_shopping_cart_default.php <<<<<<<<<<<<<<

    change line 85 from (line 85 for me)

    Code:
    <a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>to

    Code:
    <a href="<?php echo $product['linkProductsName']; ?>"><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>
    line 89 for me:
    before:

    Code:
    echo $product['attributeHiddenField'];ADD:

    Code:
    if (isset($product['attributes']) && is_array($product['attributes'])) {
    echo '';

    }else {
    ?><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><?PHP
    }
    line 101 for me:
    directly after

    Code:
    foreach ($product['attributes'] as $option => $value) {add

    Code:
    echo zen_image(DIR_WS_IMAGES . $value['attributes_image'], $products[$i]['name'], IMAGE_SHOPPING_CART_WIDTH, IMAGE_SHOPPING_CART_HEIGHT);

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

    Default Re: display product attributes on checkout payment page

    You could try this code on the tpl_checkout_payment_default.php from the checkout_confirmation:
    Code:
          <table border="0" width="100%" cellspacing="0" cellpadding="0" id="cartContentsDisplay">
            <tr class="cartTableHeading">
            <th scope="col" id="ccQuantityHeading" width="30"><?php echo TABLE_HEADING_QUANTITY; ?></th>
            <th scope="col" id="ccProductsHeading"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
    <?php
      // If there are tax groups, display the tax columns for price breakdown
      if (sizeof($order->info['tax_groups']) > 1) {
    ?>
              <th scope="col" id="ccTaxHeading"><?php echo HEADING_TAX; ?></th>
    <?php
      }
    ?>
              <th scope="col" id="ccTotalHeading"><?php echo TABLE_HEADING_TOTAL; ?></th>
            </tr>
    <?php // now loop thru all products to display quantity and price ?>
    <?php for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { ?>
            <tr class="<?php echo $order->products[$i]['rowClass']; ?>">
              <td  class="cartQuantity"><?php echo $order->products[$i]['qty']; ?>&nbsp;x</td>
              <td class="cartProductDisplay"><?php echo $order->products[$i]['name']; ?>
              <?php  echo $stock_check[$i]; ?>
    
    <?php // if there are attributes, loop thru them and display one per line
        if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0 ) {
        echo '<ul class="cartAttribsList">';
          for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
    ?>
          <li><?php echo $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])); ?></li>
    <?php
          } // end loop
          echo '</ul>';
        } // endif attribute-info
    ?>
            </td>
    
    <?php // display tax info if exists ?>
    <?php if (sizeof($order->info['tax_groups']) > 1)  { ?>
            <td class="cartTotalDisplay">
              <?php echo zen_display_tax_value($order->products[$i]['tax']); ?>%</td>
    <?php    }  // endif tax info display  ?>
            <td class="cartTotalDisplay">
              <?php echo $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']);
              if ($order->products[$i]['onetime_charges'] != 0 ) echo '<br /> ' . $currencies->display_price($order->products[$i]['onetime_charges'], $order->products[$i]['tax'], 1);
    ?>
            </td>
          </tr>
    <?php  }  // end for loopthru all products ?>
          </table>
          <hr />
    place it above the line:
    Code:
    <fieldset id="checkoutOrderTotals">
    and see if that is what you are looking for ...
    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: v1.5.5]
    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!

  4. #4
    Join Date
    Sep 2011
    Posts
    86
    Plugin Contributions
    0

    Default Re: display product attributes on checkout payment page

    I tried the code but it still shows the tanktop in the defalt image and white, instead of the black when I choose that attribute.

    this is my test site if you would like to see it.

    http://www.sinecurewine.com/catalog/index.php

    I am working with the relaxed tank, and I have rollover images working in the product type, from one of the mods. Do you think this could be the issue?

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

    Default Re: display product attributes on checkout payment page

    You need to fix your site ... some links use the /catalog some use /cgi/store ...

    When using the cart for /catalog and actually getting to the /catalog checkout I seem to have the right attributes on the checkout_payment ...
    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: v1.5.5]
    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
    Sep 2011
    Posts
    86
    Plugin Contributions
    0

    Default Re: display product attributes on checkout payment page

    Yes, I am sorry I should have been more clear, I am getting ready to push the test shopping site up to the full site so some links on the above sections go to the live site. I am moving away from CGI to zencart, but I need to have it all working first.

    I am a little confused when you say you see "catalog and actually getting to the /catalog checkout"

    When I am at this stage of the purchase
    "http://www.sinecurewine.com/catalog/index.php?main_page=shopping_cart&number_of_uploads=0"

    I see a white thumb nail of the garment and not the black. I would like to see a black one when I choose that attribute, I am sorry for not been clear.

  7. #7
    Join Date
    Sep 2011
    Posts
    86
    Plugin Contributions
    0

    Default Re: display product attributes on checkout payment page

    I think I may have messed everything up in regards to what I am attempting.

    After a person selects a garment with the option of black, I would like for them to see the thumb nail of the garment in black in their shopping cart. which is one of my rollover thumb nails from the product page.

    I have this code from a closed thread in 2008, but I do not know if it is still valid with 1.3.9

    First open: includes > modules > pages > shopping_cart > header_php.php

    Look around line 93 for this:

    Code:
    $attributes = "SELECT popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefixand add: pa.attributes_image to the list

    Next, scan a little further down (around line 117) for this:


    Code:
    $attrArray[$option]['products_options_name'] = $attributes_values->fields['products_options_name'];
    $attrArray[$option]['options_values_id'] = $value;
    $attrArray[$option]['products_options_values_name'] = zen_output_string_protected($attr_value) ;
    $attrArray[$option]['options_values_price'] = $attributes_values->fields['options_values_price'];
    $attrArray[$option]['price_prefix'] = $attributes_values->fields['price_prefix'];and add:
    $attrArray[$option]['attributes_image'] = $attributes_values->fields['attributes_image'];

    Save and upload this file.

    Now find: includes > templates > YOUR_TEMPLATE_NAME > templates > tpl_shopping_cart_default.php

    Look around line 98:


    Code:
    <li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>and change to the following:

    <li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . zen_image(DIR_WS_IMAGES . $value['attributes_image']); ?></li>

    Any suggestion would greatly be appreciated, and I can promise coffee on the way.

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

    Default Re: display product attributes on checkout payment page

    Your code works fine, but you are using an add on to manage the displayed attribute images if I am not mistaken ...

    Look in the Admin at the Product in the Attributes Controller ...

    What is the actual image on the Black Attribute?
    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: v1.5.5]
    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!

  9. #9
    Join Date
    Sep 2011
    Posts
    86
    Plugin Contributions
    0

    Default Re: display product attributes on checkout payment page

    Yes, I am.

    It sounds like I need to better understand the attributes mod. What I am glening from your comments is that there is a way to select the black thumb nail with the attribute. I will have to find some text to better understand, sorry.

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

    Default Re: display product attributes on checkout payment page

    Check the black attribute ... is the black image on that?

    If not, are you able to add the black image to the black attribute or does that cause a problem?
    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: v1.5.5]
    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!

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Display Attributes on PayPal Payment Page and Invoice
    By numinix in forum PayPal Express Checkout support
    Replies: 0
    Last Post: 1 Sep 2010, 08:00 PM
  2. Text/image display question on attributes in the product info AND checkout pages
    By jeffmic in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 6 May 2010, 10:44 PM
  3. Attributes color/image display on product info page
    By shocker in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 2 Dec 2008, 04:37 AM
  4. Missing attributes on product display page
    By slabadoo in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 4 Jun 2007, 08:18 PM
  5. Add Attributes Controller Twice on Product Display Page
    By axl23 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 2 Jun 2006, 01:39 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR