Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 41
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How can I show the attribute weight for each item in cart?

    Oh ... well ... never mind ...

    Nope, they are not broken out in the shopping cart as the product weight is not broken out in the shopping cart either ...

    This could be done, but it would take quite a bit of custom coding ... have you got your coder's hat on?
    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!

  2. #12
    Join Date
    Aug 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: How can I show the attribute weight for each item in cart?

    Yes I am a pretty good manipulator of code -

    in tpl_shipping_default.php is where the mod must take place I believe

    <li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>

    It should call the products_attributes_weight here but I cannot get it to show - more to this I know

    There is a attribute in attributes controller

    <input type="text" name="products_attributes_weight_prefix" value="<?php echo $attributes_values->fields['products_attributes_weight_prefix']; ?>" size="2">&nbsp;<input type="text" name="products_attributes_weight" value="<?php echo $attributes_values->fields['products_attributes_weight']; ?>" size="6">

  3. #13
    Join Date
    Aug 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: How can I show the attribute weight for each item in cart?

    Want to be able to have the poundage show so I know what to put into each box

    Anyway thanks for your help and thoughts - guess I will have to either re-think this or hire a coder who knows this better

    I did another way for hours setting up weights as option values but then thought why not use the weight feature - blah

    It seems to make sense if you offer the options for individual weights in attributes they should be shown everywhere

    The product totals display reads the formula with the products_attributes_weight for each option when its added up top in total weight

    wish I could just parse the weight into the final list in cart


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

    Default Re: How can I show the attribute weight for each item in cart?

    You can customize the file:
    /includes/modules/pages/shopping_cart/header_php.php

    and include the fields:
    products_attributes_weight
    products_attributes_weight_prefix

    in the select statement so that the information is available per attribute in the tpl_shopping_cart_default.php

    Just follow the pattern of the:
    options_values_price
    price_prefix
    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!

  5. #15
    Join Date
    Aug 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: How can I show the attribute weight for each item in cart?

    Hello just saw this - I am trying your suggestion - thank you so much!

    Stay tuned - btw I am very happy with everything in Zen Cart. Its a wicked program and everything up to this point has been a breeze.

    I know I can crack this.

    Big Thx.

  6. #16
    Join Date
    Aug 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: How can I show the attribute weight for each item in cart?

    YOU ROCK

    I DID IT!!!

    I AM VERY HAPPY AND NOW CAN FINISH MY PROJECT

    EASY TO CUSTOMIZE

    THANK YOU THANK YOU



    AJEH IS THE BEST !

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

    Default Re: How can I show the attribute weight for each item in cart?

    You are most welcome ... glad that we could get you back on track ...

    That is tricky code in there, you done good ...
    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!

  8. #18
    Join Date
    Aug 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: How can I show the attribute weight for each item in cart?

    Thank you! One more major thing if I may?

    So I have entered all the options for each product and can now see the weights in the shopping cart itself - great!

    Of course I want to show the weights in the confirmation page, order history, invoice and order!

    They all share the same string on each page:

    <li><?php echo $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])); ?></li>

    Any ideas about what I put in here to show weight? Than I can add to all the above mentioned pages...

    Thanks again.

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

    Default Re: How can I show the attribute weight for each item in cart?

    This is the section on the Account History tpl_account_history_info_default.php that echos out the display:
    PHP Code:
        <tr>
            <td class="accountQuantityDisplay"><?php echo  $order->products[$i]['qty'] . QUANTITY_SUFFIX?></td>
            <td class="accountProductDisplay"><?php echo  $order->products[$i]['name'];

        if ( (isset(
    $order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
          echo 
    '<ul id="orderAttribsList">';
          for (
    $j=0$n2=sizeof($order->products[$i]['attributes']); $j<$n2$j++) {
            echo 
    '<li>' $order->products[$i]['attributes'][$j]['option'] . TEXT_OPTION_DIVIDER nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])) . '</li>';
          }
            echo 
    '</ul>';
        }
    ?>
            </td>
    <?php
        
    if (sizeof($order->info['tax_groups']) > 1) {
    ?>
            <td class="accountTaxDisplay"><?php echo zen_display_tax_value($order->products[$i]['tax']) . '%' ?></td>
    <?php
        
    }
    ?>
            <td class="accountTotalDisplay"><?php echo $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true$order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != '<br />' $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true$order->info['currency'], $order->info['currency_value']) : ''?></td>
        </tr>
    This is the section of the orders.php class that builds that section ...
    PHP Code:
          $subindex 0;
          
    $attributes_query "select products_options_id, products_options_values_id, products_options, products_options_values,
                                  options_values_price, price_prefix from " 
    TABLE_ORDERS_PRODUCTS_ATTRIBUTES "
                                   where orders_id = '" 
    . (int)$order_id "'
                                   and orders_products_id = '" 
    . (int)$orders_products->fields['orders_products_id'] . "'";

          
    $attributes $db->Execute($attributes_query);
          if (
    $attributes->RecordCount()) {
            while (!
    $attributes->EOF) {
              
    $this->products[$index]['attributes'][$subindex] = array('option' => $attributes->fields['products_options'],
                                                                       
    'value' => $attributes->fields['products_options_values'],
                                                                       
    'prefix' => $attributes->fields['price_prefix'],
                                                                       
    'price' => $attributes->fields['options_values_price']);

              
    $subindex++;
              
    $attributes->MoveNext();
            }
          } 
    Again you need to load the weight and prefix into the select then add it to the array so it is available in the template ...
    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!

  10. #20
    Join Date
    Aug 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: How can I show the attribute weight for each item in cart?

    Hi - sorry I was away - now I am back. Great thanks for that - I did it again!!

    I achieved the array in the orders.php and now can see the weight in orders history.


    However I would like to see the weight in checkout confirmation, email confirmation and the invoice page.

    I tried to add the weight but did not work - it won't read the string.

    Is there another place I have to add the array for these pages?

    Ajeh - thanks again!

 

 
Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

  1. how can I force the customer to enter a Code for each item that he adds?
    By iwashere in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 31 Aug 2011, 08:29 PM
  2. list a price for each item on the shopping cart content page
    By hoang in forum Templates, Stylesheets, Page Layout
    Replies: 23
    Last Post: 16 Apr 2010, 08:17 PM
  3. Can I have each attribute show its price without using Priced By Attribute?
    By linuxmant in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 18 Nov 2009, 07:58 PM
  4. How to find out the total weight for each order?
    By doubletiger in forum General Questions
    Replies: 0
    Last Post: 12 Nov 2007, 05:58 PM
  5. Can I have each attribute separately in the shopping cart?
    By vatel in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 7 May 2007, 05:45 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