News:

Looking for documentation? Take a look on our wiki

Main Menu

How can I get the order weight?

Started by m.davide82, July 14, 2020, 16:54:00 PM

Previous topic - Next topic

m.davide82

Hi,

How can I get the order weight?
Which is the right php variable?
Vm 3.6 - php 7.3



Thanks a lot.
Davide

AH

Regards
A

Joomla 3.10.11
php 8.0

m.davide82

In the invoice/order confirmation, for example.

AH

It really depends on what you want to do

From what I can see - if you are aiming to add this information to the templates for display/print, you may find that you will have to calculate it from the order_items data.

The shipping plugin does store order_weight that was used at the time shipping was calculated - you could get that data from the table - but it may not reflect the current state of the order.
Regards
A

Joomla 3.10.11
php 8.0

m.davide82

Hi,

I've seen the ther order_weight is stored in the shipping orders table.
I would like to have that value in a variable!  :)


Thanks.

Davide

AH

Well you will have to create it then :-)

Just use the order details to get the shipping table entry and get it from there
Regards
A

Joomla 3.10.11
php 8.0

m.davide82


pinochico

QuoteAny help?

Any help for what?

The post from AH is finally help.
You must develop self, why are you don't understand?

Maybe you are waiting for code :D
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

AH

I will not be posting code - it is easy for a coder to do in php as a template override if necessary
Regards
A

Joomla 3.10.11
php 8.0