Forums / Customization from the Admin / Show Shipping Weights for Items

Show Shipping Weights for Items

Locked

Views: 3,250

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
31 Aug 2008, 11:57 PM
#1
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Show Shipping Weights for Items

It there a way to show or enable the ability to see the shipping weights for items in the admin side of the catalog without having to click edit?

Thanks
Bor

1 Sep 2008, 2:38 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Show Shipping Weights for Items

You would need to customize the admin module:
category_product_listing.php

add the
p.products_weight

to the two select statements and then you can call it and display it on the listing with:
$products->fields['products_weight']

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!

1 Sep 2008, 5:28 AM
#3
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: Show Shipping Weights for Items

I see around line 239:
$products_query_raw = ("select p.products_weight ...
} else {
$products_query_raw = ("select p.products_weight ...

Where do I place $products->fields['products_weight']

Is this the correct location for

// Split Page
?>
<td class="dataTableContent" width="20" align="right"><?php echo $products->fields['products_id']; ?></td>
<td class="dataTableContent"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT, 'cPath=' . $cPath . '&pID=' . $products->fields['products_id'] . '&action=new_product_preview&read=only' . '&product_type=' . $products->fields['products_type'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products->fields['products_name']; ?></td>
<td class="dataTableContent"><?php echo $products->fields['products_model']; ?></td>
<td class="dataTableContent"><?php echo **$products->fields['products_weight'];** ?></td>
<td colspan="2" class="dataTableContent" align="right"><?php echo zen_get_products_display_price($products->fields['products_id']); ?></td>
<td class="dataTableContent" align="right"><?php echo $products->fields['products_quantity']; ?></td>
<td class="dataTableContent" width="50" align="left">

1 Sep 2008, 2:30 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Show Shipping Weights for Items

Are you now seeing the products_weight on the listing?

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!

1 Sep 2008, 3:52 PM
#5
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: Show Shipping Weights for Items

No its not showing up :wacko:

1 Sep 2008, 4:12 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Show Shipping Weights for Items

That is odd ... I am having no problem making that show up with the p.products_weight added to the two select statements then echoing it in the listing ...

Try reloading your new custom file and make sure that it does update on the server ...

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!

1 Sep 2008, 5:08 PM
#7
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: Show Shipping Weights for Items

:yuck:

I hope you dont mind taking a peek Linda

Thanks in advance

1 Sep 2008, 5:19 PM
#8
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: Show Shipping Weights for Items

Well I cant attach it hehe

1 Sep 2008, 7:42 PM
#9
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: Show Shipping Weights for Items

Is there somewhere else I have to put it?

$products_query_raw = ("select p.products_weight, p.products_type, p.products_id, pd.products_name, p.products_quantity,
p.products_image, p.products_price, p.products_date_added,
p.products_last_modified, p.products_date_available,
p.products_status, p2c.categories_id,
p.products_model,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
p.products_quantity_order_max, p.products_sort_order,
p.master_categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, "
. TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and (p.products_id = p2c.products_id
and p.master_categories_id = p2c.categories_id)
and (
pd.products_name like '%" . zen_db_input($_GET['search']) . "%'
or pd.products_description like '%" . zen_db_input($_GET['search']) . "%'
or p.products_model like '%" . zen_db_input($_GET['search']) . "%')" .
$order_by);

} else {
  $products_query_raw = ("select p.products_weight, p.products_type, p.products_id, pd.products_name, p.products_quantity,
                                   p.products_image, p.products_price, p.products_date_added,
                                   p.products_last_modified, p.products_date_available,
                                   p.products_status, p.products_model,
                                   p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
                                   p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
                                   p.products_quantity_order_max, p.products_sort_order
                            from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
                            where p.products_id = pd.products_id
                            and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                            and p.products_id = p2c.products_id
                            and p2c.categories_id = '" . (int)$current_category_id . "'" .
                            $order_by);
}

// Split Page
?>
<td class="dataTableContent" width="20" align="right"><?php echo $products->fields['products_id']; ?></td>
<td class="dataTableContent"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT, 'cPath=' . $cPath . '&pID=' . $products->fields['products_id'] . '&action=new_product_preview&read=only' . '&product_type=' . $products->fields['products_type'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products->fields['products_name']; ?></td>
<td class="dataTableContent"><?php echo $products->fields['products_model']; ?></td>
<td class="dataTableContent"><?php echo $products->fields['products_weight']; ?></td>
<td colspan="2" class="dataTableContent" align="right"><?php echo zen_get_products_display_price($products->fields['products_id']); ?></td>
<td class="dataTableContent" align="right"><?php echo $products->fields['products_quantity']; ?></td>
<td class="dataTableContent" width="50" align="left">

<?php
1 Sep 2008, 8:40 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Show Shipping Weights for Items

I have the same, more or less, on what you did:

      $products_query_raw = ("select p.products_type, p.products_id, pd.products_name, p.products_quantity,
                                       p.products_image, p.products_price, p.products_date_added,
                                       p.products_last_modified, p.products_date_available,
                                       p.products_status, p2c.categories_id,
                                       p.products_model, p.products_weight,
                                       p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
                                       p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
                                       p.products_quantity_order_max, p.products_sort_order,
                                       p.master_categories_id
                                from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, "
                                       . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
                                where p.products_id = pd.products_id
                                and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                                and (p.products_id = p2c.products_id
                                and p.master_categories_id = p2c.categories_id)
                                and (
                                pd.products_name like '%" . zen_db_input($_GET['search']) . "%'
                                or pd.products_description like '%" . zen_db_input($_GET['search']) . "%'
                                or p.products_model like '%" . zen_db_input($_GET['search']) . "%')" .
                                $order_by);

    } else {
      $products_query_raw = ("select p.products_type, p.products_id, pd.products_name, p.products_quantity,
                                       p.products_image, p.products_price, p.products_date_added,
                                       p.products_last_modified, p.products_date_available,
                                       p.products_status, p.products_model, p.products_weight,
                                       p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
                                       p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
                                       p.products_quantity_order_max, p.products_sort_order
                                from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
                                where p.products_id = pd.products_id
                                and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                                and p.products_id = p2c.products_id
                                and p2c.categories_id = '" . (int)$current_category_id . "'" .
                                $order_by);
    }
// Split Page

And I just tossed the reference to the products_weight with xxx in there to see it:

// Split Page
?>
                <td class="dataTableContent" width="20" align="right"><?php echo $products->fields['products_weight'] . 'xxx' . $products->fields['products_id']; ?></td>
                <td class="dataTableContent"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT, 'cPath=' . $cPath . '&pID=' . $products->fields['products_id'] . '&action=new_product_preview&read=only' . '&product_type=' . $products->fields['products_type'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products->fields['products_name']; ?></td>
                <td class="dataTableContent"><?php echo $products->fields['products_model']; ?></td>
                <td colspan="2" class="dataTableContent" align="right"><?php echo zen_get_products_display_price($products->fields['products_id']); ?></td>
                <td class="dataTableContent" align="right"><?php echo $products->fields['products_quantity']; ?></td>
                <td class="dataTableContent" width="50" align="left">

I am not really seeing any differences ... :unsure:

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!

1 Sep 2008, 10:03 PM
#11
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: Show Shipping Weights for Items

Yea its not working, I pasted your code straight over the other maybe there is some other place I need to put it or override it?

1 Sep 2008, 10:26 PM
#12
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: Show Shipping Weights for Items

attached a pic

2 Sep 2008, 2:42 AM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Show Shipping Weights for Items

Do you have any kind of add-ons or anything?

I do not even see the 'xxx' in that image and even if the weight was not working, you should at least see the 'xxx' showing ...

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!

2 Sep 2008, 7:31 AM
#14
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: Show Shipping Weights for Items

:censored:
:oops:

I found I have two category_product_listing.php

One under

store/admin/includes/modules/

The other at
store/includes/modules/

I'm making the changes in both, I assume if could be the
Lieberman QBI I have installed for testing. :wacko:

2 Sep 2008, 7:56 AM
#15
borillion_star avatar

borillion_star

New Zenner

Join Date:
Jan 2008
Posts:
73
Plugin Contributions:
0

Re: Show Shipping Weights for Items

WOOT!!

Fixed It was the one under /store/admin/includes/modules/

One other question how do I add a column title for it and keep it
from pushing all the other columns out of the way :P

Thanks a ton Linda!!!! :clap::hug:

2 Sep 2008, 2:53 PM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Show Shipping Weights for Items

Glad you were able to get this fixed once you applied the changes to the right file ... :smile:

For the existing titles you need to find the existing titles and add a new <td> for that as well ...

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!