Results 1 to 10 of 54

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Location
    Sri_lanka
    Posts
    26
    Plugin Contributions
    0

    Default Re: Changing Weight from Pounds to Kilos


    item code is the field that i newly added ,its same as products attributes weight.i want it to display on check out page as,

    products_name
    attribute name-attribute value -price- item code
    attribute name-attribute value -price- item code
    attribute name-attribute value -price- item code

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

    Default Re: Changing Weight from Pounds to Kilos

    It sounds like you want this on the Catalog for display about the Product and its Attribtues ... then in the Checkout ... and probably are going to want it in the Admin ...

    The best way to manage that for the checkout is to add the field to the orders_products_attributes table so you have this reference in the Admin ...

    Then, customize the catalog order class to gather this information and save this information ...

    Then, customize the admin order class to allow you to display this information ...
    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
    Feb 2010
    Location
    Sri_lanka
    Posts
    26
    Plugin Contributions
    0

    Default Re: Changing Weight from Pounds to Kilos

    thanks jay,
    but its not clear................... im not a expert on zencart

    can you please tell me which files do i have to edit.
    i have add new field on order_products_attribute table.from where its getting updated? (where the values get inserted to that table)....can u plz explain the files and bit codes..................

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

    Default Re: Changing Weight from Pounds to Kilos

    You need to edit the order.php class file ...
    /includes/classes/order.php

    First follow where the table references for:
    TABLE_PRODUCTS_ATTRIBUTES

    are and add your new field references there ...

    Next follow where the table references for:
    TABLE_ORDERS_PRODUCTS_ATTRIBUTES

    and add your new field references ...

    Then, you need to do the same, similar thing in the Admin order.php class:
    /admin/includes/classes/order.php

    It takes a bit of sorting out, but should help you get this information from the
    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!

  5. #5
    Join Date
    Feb 2010
    Location
    Sri_lanka
    Posts
    26
    Plugin Contributions
    0

    Default Re: Changing Weight from Pounds to Kilos

    hi ajah,
    thanks for the instructions.
    i have changed the files you mention already.in checkout page

    Qty. Item Name Total
    1 x President Orthopaedic Divan Guest Bed £249.99

    * add mettress?($450): Yes (item code)


    this display part is from tpl_checkout_split.php
    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++) {
    echo '<li>' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br($order->products[$i]['attributes'][$j]['value']).'</li>';

    i tried to add . $order->products[$i]['attributes'][$j]['itemcode'] . but it wont disply.

    and i want to know from which file the order_attributes inserted to date base.then i can edit it to add the item_code .

    is that ok.....................ohhhhhhhhhhh

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

    Default Re: Changing Weight from Pounds to Kilos

    You have to follow the code in the whole order.php to manage a field that needs to go from the products_attributes table to the orders_products_attributes table ...

    Try a search on:
    prefix

    to see where the fields are used ...

    You have to extract the field from the products_attributes table to add it to the orders_products_attributes table ...

    And while this is a vague search, try a search on:
    $attributes

    to also follow the pattern ...

    Think about what fields/data are currently being stored in both tables ...
    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!

  7. #7
    Join Date
    Feb 2010
    Location
    Sri_lanka
    Posts
    26
    Plugin Contributions
    0

    Default Re: Changing Weight from Pounds to Kilos

    order.zip
    please checkthis, i think theres no prob with this.

 

 

Similar Threads

  1. Changing weight from pounds to grams & kgs
    By Jasper122 in forum Addon Shipping Modules
    Replies: 6
    Last Post: 23 Aug 2011, 09:29 AM
  2. Change displayed weight from lbs to kilos, or tons, etc?
    By worldmaker in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 1 Jun 2011, 04:58 PM
  3. Weight change from kgs to pounds
    By Dale Dugas in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 19 Dec 2009, 11:28 PM
  4. Display pounds as kilos
    By 8th-heaven in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 27 Jun 2008, 10:01 PM
  5. Display pounds as kilos
    By 8th-heaven in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 27 Jun 2008, 09:19 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