Author Topic: Order need weight  (Read 289 times)

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3029
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Order need weight
« on: February 27, 2018, 23:49:18 pm »
Hi,
Currently weight is dynamic calculated from items.
This is not right, at the moment the order is created, the weight should not changes when you modify product weight after.
So to say, all main values should not be dynamic, eg shipment , attributes ... because this break when you change a product, disable or remove a customfield.
In the item, we should have a Text HTML attribut and attributes using params, if this have to be dynamical.
I think this should solve many problem and if some dynamic content need to be updated, it should only be update on request.
I know this break the current concept, but it's note really safe currently.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2738
  • VirtueMart Version: 3.2.15
Re: Order need weight
« Reply #1 on: February 28, 2018, 12:07:46 pm »
Whilst your idea may sound very reasonable for some, for others having "fixed order point" date could prove to be unhelpful.

Agreed that things should not break - e.g. removing a customfield should not cause an order to fail to load (never tested this scenario though )

Unsure as to why you use the word "safe"?

Interested to see what other users think.


regards
A

Joomla 3.8.8
php 5.6 + php 7.0

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3029
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Order need weight
« Reply #2 on: February 28, 2018, 12:28:47 pm »
safe because order should never fail and always render calculated values.
If for some reason you remove a product, the order cannot get the weight for calculation.
I use for eg an API, this get called manually by my customer and if for some reason it remove a product the result is bad.
I think that all essential values should be saved in database and dynamical loaded to override this value, if this values exist.
Not only weight but size can be a problem too and missing customfields values ...