Jump to content

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

Generating Orders Without Calculating Shipping Rate Topic   - - - - -

 
  • sitmgreg
  • Member
  • Members
  • Join Date: 01-Jun 16
  • 39 posts

Posted 16 June 2017 - 12:08 AM #1

We have a case where we'd like to generate orders in batches, but not call any realtime shipping methods since these particular orders are all using the same non realtime shipping method. It looks to me like they're being requested in `fn_calculate_cart_content`

 

Any ideas on how to avoid this part of the calculation? If I don't get a response here, what is the recommended path to get an answer? Do I need to buy a support thread from SIMTech?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 14,269 posts

Posted 16 June 2017 - 05:27 AM #2

Try to set 3rd parameter of this function to S

// calculate_shipping:
// A - calculate all available methods
// E - calculate selected methods only (from cart[shipping])
// S - skip calculation

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия

 
  • sitmgreg
  • Member
  • Members
  • Join Date: 01-Jun 16
  • 39 posts

Posted 16 June 2017 - 10:22 PM #3

Yes, I don't think that setting has any meaning. Check this thread over here:

 

http://forum.cs-cart...g/?fromsearch=1

 

I have confirmed that if I take a cachegrind  profile, whether we are passing A, E or S there are still multiple calls to RealtimeServices::getRates()



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 14,269 posts

Posted 19 June 2017 - 05:28 AM #4

Al alternative try to use the calculate_cart_items in the fn_calculate_cart_content function and set $cart['calculate_shipping'] to false


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия

 
  • sitmgreg
  • Member
  • Members
  • Join Date: 01-Jun 16
  • 39 posts

Posted 20 June 2017 - 05:56 PM #5

Ok, yes that does seem to work. Thanks for the tip



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 14,269 posts

Posted 21 June 2017 - 05:45 AM #6

Ok, yes that does seem to work. Thanks for the tip

 

Thank you for keeping us updated


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration

Certified CS-Cart RU Developer | Сертифицированный разработчик на CS-Cart Русская Версия