News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Weights in product invoices

Started by yobokkie, February 11, 2013, 08:54:00 AM

Previous topic - Next topic

yobokkie

I did a topic search on this board and can't find any answers to this question so apologies if it's been asked before, but is there any easy way to add the product weights and total weight to the order email that gets sent out to clients? The reason for this is because the shipping on this store are for big items and wholesale orders so the shipping needs to be quoted on based on the weights of the products. So it needs to be displayed to the clients and vendor so a quote can be issued quickly.
I'm looking at the source code on the orders model I see this SQL query to fetch the products on the order:
$q = 'SELECT virtuemart_order_item_id, product_quantity, order_item_name,
    order_item_sku, i.virtuemart_product_id, product_item_price,
    product_final_price, product_basePriceWithTax, product_subtotal_with_tax, product_subtotal_discount, product_tax, product_attribute, order_status,
    intnotes, virtuemart_category_id
   FROM (#__virtuemart_order_items i
   LEFT JOIN #__virtuemart_products p
   ON p.virtuemart_product_id = i.virtuemart_product_id)
                        LEFT JOIN #__virtuemart_product_categories c
                        ON p.virtuemart_product_id = c.virtuemart_product_id
   WHERE `virtuemart_order_id`="'.$virtuemart_order_id.'" group by `virtuemart_order_item_id`';

So now obviously I can add in p.product_weight and product_weight_uom to the list of things it fetches from the DB and then call this into my template but at the next update this will be removed. Is there another way I'm not seeing that will allow this to be pulled in without adding an sql query to the view and still making it update-proof?
Otherwise what can one do to request that this line of code be permanently be changed to include the two weight columns?
IE:
$q = 'SELECT virtuemart_order_item_id, product_quantity, order_item_name,
    order_item_sku, i.virtuemart_product_id, product_item_price, p.product_weight, p.product_weight_uom,
    product_final_price, product_basePriceWithTax, product_subtotal_with_tax, product_subtotal_discount, product_tax, product_attribute, order_status,
    intnotes, virtuemart_category_id
   FROM (#__virtuemart_order_items i
   LEFT JOIN #__virtuemart_products p
   ON p.virtuemart_product_id = i.virtuemart_product_id)
                        LEFT JOIN #__virtuemart_product_categories c
                        ON p.virtuemart_product_id = c.virtuemart_product_id
   WHERE `virtuemart_order_id`="'.$virtuemart_order_id.'" group by `virtuemart_order_item_id`';