Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Need_Shipment Vs Need_Shipping Rate Topic   - - - - -

 
  • judoscott
  • Member
  • Members
  • Join Date: 19-Mar 16
  • 47 posts

Posted 20 April 2017 - 07:33 PM #1

Can anyone explain these variables in order details?

 

Documentation isn't very clear.

 

http://docs.cs-cart....l#order-details

 

 

 

 

 



 
  • judoscott
  • Member
  • Members
  • Join Date: 19-Mar 16
  • 47 posts

Posted 21 April 2017 - 01:15 PM #2

never mind figured it out after digging around in the functions.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 9,811 posts

Posted 21 April 2017 - 09:07 PM #3

Care to share what you found?  Keeps others from having to go get a shovel.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • judoscott
  • Member
  • Members
  • Join Date: 19-Mar 16
  • 47 posts

Posted 24 April 2017 - 05:41 PM #4

Its pretty convoluted but if you look in fn.cart.php in fn_get_order_info you can see the logic.

 

 

need_shipment is set then there are still products that should be sent.

need_shipping means that shipping information is required

 

its not clear to me how the need_shipping is actually used though.

 

For my purposes is seemed easier to use the product line information in the order. Each product ordered has the following variables:

 

shipped_amount -> amount of products that have been shipped

shipment_amount -> amount of products that need to be shipped

amount -> total number of items orders

 

These are very straight forward in their implementation in the same function so less likely to lead to a misunderstanding.



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 9,811 posts

Posted 24 April 2017 - 09:00 PM #5

I think you'll find that many of these type of "flags" stored in order extra data areas are (or have been) used by different parts of the system and by different addons. They have also probably "evolved" over time and many may no longer be used or are down to being used in one use case only.  If you plan to rely upon them, make sure you can trace where they're updated from and whether that data is in fact still valid.

 

IMHO, basic data like: amount, amount_shipped, remaining_to_be_shipped,  order_total, total_paid, balance_due should all be "managed" by the core and updated from the various subsystems (payments, shipping, etc.) via an API or system function/class.  But there are so many like "display_price", etc. that just seem to make no sense given the current product.  Obviously many of the "remainder" values can be computed easily if the supporting data is in fact accurate and consistent.

 

The actual orders table has grown/flattened over time too and should probably (hopefully) be refactored in V5.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • judoscott
  • Member
  • Members
  • Join Date: 19-Mar 16
  • 47 posts

Posted 25 April 2017 - 07:01 PM #6

Yeah I am seeing that too. They really need to implement a better change management system. I like cscart but you can see a lot of  the bloat from where they were learning as they go.