Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
added 183 characters in body
Source Link
Crab
  • 21
  • 4

I have a custom shipping quote module which adds freight costs to the orders admin comments:

$order_id = intval($_SESSION['cart_order']);
uc_order_comment_save($order_id, 0, t($shippingquote_text), 'admin');

This works correctly when the user goes through the checkout process.

Problem: How do i find the order id when the admin is manually editing a users order?

For example: admin is on admin/store/orders/3845/edit and clicks get shipping quote button - which fires freight quote module

Want: comment is saved to order 3845 w shipping quote details.

My answer below is valid for Ubercart 7.36 as the page doesn't use Ajax.
UberCart 7.38 Uses Ajax, and the same variable isn't available. Still looking for an answer

I have a custom shipping quote module which adds freight costs to the orders admin comments:

$order_id = intval($_SESSION['cart_order']);
uc_order_comment_save($order_id, 0, t($shippingquote_text), 'admin');

This works correctly when the user goes through the checkout process.

Problem: How do i find the order id when the admin is manually editing a users order?

For example: admin is on admin/store/orders/3845/edit and clicks get shipping quote button - which fires freight quote module

Want: comment is saved to order 3845 w shipping quote details.

I have a custom shipping quote module which adds freight costs to the orders admin comments:

$order_id = intval($_SESSION['cart_order']);
uc_order_comment_save($order_id, 0, t($shippingquote_text), 'admin');

This works correctly when the user goes through the checkout process.

Problem: How do i find the order id when the admin is manually editing a users order?

For example: admin is on admin/store/orders/3845/edit and clicks get shipping quote button - which fires freight quote module

Want: comment is saved to order 3845 w shipping quote details.

My answer below is valid for Ubercart 7.36 as the page doesn't use Ajax.
UberCart 7.38 Uses Ajax, and the same variable isn't available. Still looking for an answer

highlight code & example
Source Link
Shawn Conn
  • 26.9k
  • 15
  • 49
  • 73

I have a custom shipping quote module which adds freight costs to the orders admin comments:

$order_id = intval($_SESSION['cart_order']); uc_order_comment_save($order_id, 0, t($shippingquote_text), 'admin');

$order_id = intval($_SESSION['cart_order']);
uc_order_comment_save($order_id, 0, t($shippingquote_text), 'admin');

This works correctly when the user goes through the checkout process.

Problem: How do i find the order id when the admin is manually editing a users order?

egFor example: admin is on admin/store/orders/3845/edit

admin/store/orders/3845/edit and clicks get shipping quote button - which fires freight quote module

Want: comment is saved to order 3845 w shipping quote details.

I have a custom shipping quote module which adds freight costs to the orders admin comments:

$order_id = intval($_SESSION['cart_order']); uc_order_comment_save($order_id, 0, t($shippingquote_text), 'admin');

This works correctly when the user goes through the checkout process.

Problem: How do i find the order id when the admin is manually editing a users order?

eg admin is on admin/store/orders/3845/edit

clicks get shipping quote button - which fires freight quote module

Want: comment is saved to order 3845 w shipping quote details.

I have a custom shipping quote module which adds freight costs to the orders admin comments:

$order_id = intval($_SESSION['cart_order']);
uc_order_comment_save($order_id, 0, t($shippingquote_text), 'admin');

This works correctly when the user goes through the checkout process.

Problem: How do i find the order id when the admin is manually editing a users order?

For example: admin is on admin/store/orders/3845/edit and clicks get shipping quote button - which fires freight quote module

Want: comment is saved to order 3845 w shipping quote details.

Source Link
Crab
  • 21
  • 4
Loading