Author Topic: How can I get the order weight?  (Read 669 times)

m.davide82

  • Jr. Member
  • **
  • Posts: 170
How can I get the order weight?
« on: July 14, 2020, 16:54:00 pm »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3252
  • VirtueMart Version: 3.8.4
Re: How can I get the order weight?
« Reply #1 on: July 14, 2020, 16:56:16 pm »
when
regards
A

Joomla 3.9.20
php 7.3

m.davide82

  • Jr. Member
  • **
  • Posts: 170
Re: How can I get the order weight?
« Reply #2 on: July 14, 2020, 17:40:04 pm »
In the invoice/order confirmation, for example.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3252
  • VirtueMart Version: 3.8.4
Re: How can I get the order weight?
« Reply #3 on: July 14, 2020, 19:13:58 pm »
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.9.20
php 7.3

m.davide82

  • Jr. Member
  • **
  • Posts: 170
Re: How can I get the order weight?
« Reply #4 on: July 17, 2020, 12:47:00 pm »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3252
  • VirtueMart Version: 3.8.4
Re: How can I get the order weight?
« Reply #5 on: July 17, 2020, 12:51:35 pm »
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.9.20
php 7.3

m.davide82

  • Jr. Member
  • **
  • Posts: 170
Re: How can I get the order weight?
« Reply #6 on: July 27, 2020, 11:46:13 am »
Ehm... thanks!  :)


Any help?  :)

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 551
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: How can I get the order weight?
« Reply #7 on: July 27, 2020, 17:09:39 pm »
Quote
Any 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 from products, orders and database table
Virtuemart Email Manager - customs email templates

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3252
  • VirtueMart Version: 3.8.4
Re: How can I get the order weight?
« Reply #8 on: July 29, 2020, 19:22:05 pm »
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.9.20
php 7.3