Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order Re-Order Contribution Support


boxtel

Recommended Posts

Great! Thanks alot!!

 

I diddnt know where to put this code but I figured it out, it goes in application_top.php in case anyone else is trying to do this.

 

Awesome contribution!

Link to comment
Share on other sites

  • Replies 94
  • Created
  • Last Reply

Top Posters In This Topic

Perhaps I am not understanding this good contribution.

 

I have it installed and " working" but it does not add the existing order's attributes to the products in the cart.

 

e.g. t-shirt is in the cart but the size is missing and the color is missing.

 

Am I missing something? What should I be looking at to fix?

Link to comment
Share on other sites

Perhaps I am not understanding this good contribution.

 

I have it installed and " working" but it does not add the existing order's attributes to the products in the cart.

 

e.g. t-shirt is in the cart but the size is missing and the color is missing.

 

Am I missing something? What should I be looking at to fix?

 

use this:

 

case 'reorder' : $reorder_result = tep_reorder($_GET['order_id']);

if ($reorder_result == '') {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING));

} else {

$messageStack->add('msg', $reorder_result,'');

// echo $reorder_result;

}

break;

 

and maybe the message stack will tell you why.

Treasurer MFC

Link to comment
Share on other sites

 


case 'reorder' : $reorder_result = tep_reorder($HTTP_GET_VARS['order_id']);					   
								  if ($reorder_result == '') { 
										tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
										} else {
									echo $reorder_result; 
									} 
									break;

 

boxtel,

 

I'm using the above code that I believe functions as the one you posted. The results are that it puts the product in the cart and posts text on the page to the effect:

product: xx[product model]>Descript: Attributes changed.

e.g.

product: 10[dog-t-shirt]>Dog T-Shirt: Attributes changed

 

So I guess the issue here is "Attributes changed." Which, if I read your function correctly, means the attribute count is <1 i.e. 0. which is incorrect.

 

I do use the 'master products module' and almost all items are "slave" items. This may have a bearing.

 

Thanks for your help and for your very useful module that I hope I can take advantage of.

Link to comment
Share on other sites

 
case 'reorder' : $reorder_result = tep_reorder($HTTP_GET_VARS['order_id']);					   
								  if ($reorder_result == '') { 
										tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
										} else {
									echo $reorder_result; 
									} 
									break;

 

boxtel,

 

I'm using the above code that I believe functions as the one you posted. The results are that it puts the product in the cart and posts text on the page to the effect:

product: xx[product model]>Descript: Attributes changed.

e.g.

product: 10[dog-t-shirt]>Dog T-Shirt: Attributes changed

 

So I guess the issue here is "Attributes changed." Which, if I read your function correctly, means the attribute count is <1 i.e. 0. which is incorrect.

 

I do use the 'master products module' and almost all items are "slave" items. This may have a bearing.

 

Thanks for your help and for your very useful module that I hope I can take advantage of.

 

it means that the current attributes for that product are different from the ones when the order was placed.

Treasurer MFC

Link to comment
Share on other sites

it means that the current attributes for that product are different from the ones when the order was placed.

 

So how do I acquire the attributes from the order being re-ordered?

 

 

And thanks for helping.

Link to comment
Share on other sites

I have this working, sort of.

 

New orders I have placed as a test go into the cart with attributes. Orders previous to this install do not have their attributes. Cache issue?

 

This works for me directly from the account.php page where it shows a reorder button beside the view order button Also from the account_history.php page.

 

But if I use the view button and go the account_history_info page and try to re-order nothing is added to the cart. I suspect the order_id is not being passed.

 

.<?php echo tep_draw_form('order_reorder', tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_GET['order_id'] . '&action=reorder', 'SSL'));

echo '<td valign="middle" align="center">' . tep_image_submit('button_in_cart.gif', 'Re-Order','','update_button') . '</td>';

echo '</form>';
?>

I've also tried the code below and it has a url account_history_info/order_id//action <--- Note the double // where the order_id# should be. The Code that show // :

<?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'] . '&action=reorder', 'SSL') . '">' . tep_image_button('button_reOrder.gif', 'Reorder') . '</a>'; ?>

 

Do I understand correctly the account_history_info page SHOULD add to the cart???

Link to comment
Share on other sites

I have this working, sort of.

 

New orders I have placed as a test go into the cart with attributes. Orders previous to this install do not have their attributes. Cache issue?

 

This works for me directly from the account.php page where it shows a reorder button beside the view order button Also from the account_history.php page.

 

But if I use the view button and go the account_history_info page and try to re-order nothing is added to the cart. I suspect the order_id is not being passed.

 

.<?php echo tep_draw_form('order_reorder', tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $_GET['order_id'] . '&action=reorder', 'SSL'));

echo '<td valign="middle" align="center">' . tep_image_submit('button_in_cart.gif', 'Re-Order','','update_button') . '</td>';

echo '</form>';
?>

I've also tried the code below and it has a url account_history_info/order_id//action <--- Note the double // where the order_id# should be. The Code that show // :

<?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'] . '&action=reorder', 'SSL') . '">' . tep_image_button('button_reOrder.gif', 'Reorder') . '</a>'; ?>

 

Do I understand correctly the account_history_info page SHOULD add to the cart???

 

maybe $HTTP_GET_VARS['order_id'] works better for you.

basically you can call it from anywhere as long as you supply the order_id

Treasurer MFC

Link to comment
Share on other sites

That's it!

 

<?php echo tep_draw_form('order_reorder', tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $HTTP_GET_VARS['order_id'] . '&action=reorder', 'SSL'));

echo '<td valign="middle" align="center">' . tep_image_submit('button_reorder.gif', 'Re-Order','','update_button') . '</td>';

echo '</form>';

 

Thank you, boxtel.

Link to comment
Share on other sites

Wonderful contribution! I came across it on accident and its exactly what I was looking for.

 

Its installed fine, but currently it goes straight to checkout shipping, I would like to modify it slightly for my needs.

 

I'm using this in conjuction with order editor. I want to edit a quotation order, and have the customer confirm and pay. Since I pre-include the shipping I need the existing order to be sent directly to payment with the previous shipping charges.

 

Any ideas? Thanks for your help :thumbsup:

Edited by Naegle
Link to comment
Share on other sites

  • 2 weeks later...

boxtel,

 

I have one problem with the contribution. The re-orders are not added to the cart.

 

I've included the corresponding codes in general.php, account_history_info.php, and application_top.php.

 

Any ideas?

 

THANKS :thumbsup:

Link to comment
Share on other sites

boxtel,

 

I have one problem with the contribution. The re-orders are not added to the cart.

 

I've included the corresponding codes in general.php, account_history_info.php, and application_top.php.

 

Any ideas?

 

THANKS :thumbsup:

 

Solved it... I have Search Engine Safe URLS turned on. Turning them off solved the problem, although I'd like them on...

 

I'll see if I can find a solution

Link to comment
Share on other sites

  • 4 weeks later...

Boxtel, Thank you for this contribution. I'm also using this in conjuction with order editor, and want to restore an edited order.

 

When I edit an order (really a $0 price quote) in Admin -> the new price is displayed in cust's Order History, but on restore the old price of $0 is put in the Cart.

 

How can I restore the 'new' edited price that is displayed in Order History?

 

Thanks again,

EricK

 

PS: Dan, does it restore your edited price?

Link to comment
Share on other sites

OK, I see my problem. My edited Price in mySQL is final_price:

 

table: orders_products

products_price --> this is $0.00

final_price --> this is the correct edited price

 

So, I need to restore "final_price" not "products_price". But I don't see where price is restored. Looking in "general.php" ... where is price restored to the cart?

 

Thank you,

EricK

Link to comment
Share on other sites

Has anyone gotten this to work with Option Type - Feature contrib.

 

(Text attributes)

 

I'm trying to work through the function to figure out a way to grab the text from the last order as the option value, but i'm just missing it somewhere.

 

I am having this problem as well... the reorder don't recognize the text atributes... :huh:

 

Did anyone got lucky with that?

Link to comment
Share on other sites

OK, I see my problem. My edited Price in mySQL is final_price:

 

table: orders_products

products_price --> this is $0.00

final_price --> this is the correct edited price

 

So, I need to restore "final_price" not "products_price". But I don't see where price is restored. Looking in "general.php" ... where is price restored to the cart?

 

Thank you,

EricK

 

Order re-order does not duplicate an order but re-fills the shopping cart with the items of an order with their possible attributes if possible.

 

From there it is process as usual and as such no order specifics are restored.

This is necassary because in the time between order and re-order many parameters like tax, exchange rates, even prices may have changed.

 

I think you may need a order copy facility.

Treasurer MFC

Link to comment
Share on other sites

boxtel,

Thank you very much for your reply, I understand now that price is restored from table: products, row: products_price.

 

So, how do I modify 'Restore Order' to copy table: orders_products, field: final_price to the shopping cart?

 

I'm so close, everything else works great.

Kind regards, EricK

 

PS: I installed an order copy module, but it just duplicates existing orders.

Link to comment
Share on other sites

boxtel,

Thank you very much for your reply, I understand now that price is restored from table: products, row: products_price.

 

So, how do I modify 'Restore Order' to copy table: orders_products, field: final_price to the shopping cart?

 

I'm so close, everything else works great.

Kind regards, EricK

 

PS: I installed an order copy module, but it just duplicates existing orders.

 

so close and yet so far away.

 

as I said, re-order simply re-populates the cart. The cart subsequently does not know and therefore care where those products came from.

 

As such it handles the products as usual. So for calculate() and get_products() (used by order creation) it simply queries the product table for the additional information.

 

If you want it to query something else in case of re-order then you need to tell the cart that.

 

what you could do is in the function re-order, set a session variable $re_order_id = $order_id.

 

then in the cart you alter the mentioned functions like (pseudo code):

 

if $re_order_id is registered: get the info from orders_products table with the $re_order_id and $products_id

if not present there: get the info from the product table with the $products_id (item not in order)

else: get the info from the product table with the $products_id (normal processing)

 

so if the session variable is set (don't forget to unregister it after order completion) then it will try to get the info per product from that order. If it is not there (client added another item) then use the products table and if the session variable was not set at all (no re-order done) process as normal.

 

something like that.

Treasurer MFC

Link to comment
Share on other sites

Boxtel, Thank you for this contribution. I'm also using this in conjuction with order editor, and want to restore an edited order.

 

When I edit an order (really a $0 price quote) in Admin -> the new price is displayed in cust's Order History, but on restore the old price of $0 is put in the Cart.

 

How can I restore the 'new' edited price that is displayed in Order History?

 

Thanks again,

EricK

 

PS: Dan, does it restore your edited price?

 

 

I am having the same issue with Erick

 

I am using

Restore Order For Customer Change contribution

http://www.oscommerce.com/community/contri...h,restore+order

and

Order Editor contribution

http://www.oscommerce.com/community/contri...arch,order+edit

 

They both work fine as they where designed for but when I add a new ordertotal entry with ordereditor contrib

ordereditor.gif

 

The mysql ordertotal table is updated ok

mysql_ordertotal.gif

 

And the order invoice is updated ok

order_invoice.gif

 

When I restore the order back to the customers account - the new ordertotal entry is not restored to the customers checkout ?

ocCommerce_order_confirmation.gif

 

Can any one point us in the right direction for a fix

 

You guys are doing great work

 

Andrew

Link to comment
Share on other sites

Andrew,

 

The previous post by boxtel outlines the cause and possible solution for our problem, ie., the price is restored from the catalog price ... not from our edited price.

 

A new session variable and function is needed to tell the cart to restore price from a different location. The logic outlined above makes sense to me, however implementation is another issue.

 

Does this look like the best solution to you?

 

Regards,

EricK

Link to comment
Share on other sites

Sure does Erick - then the answer lies within this code from the restore_order.php

 

======================

/*

*********************

// RESTORE ACTION //

*********************

*/

require('includes/application_top.php');

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RESTORE_ORDER);

 

$oID = tep_db_input($HTTP_GET_VARS['oID']);

 

require(DIR_FS_CATALOG . DIR_WS_CLASSES . 'order.php');

$restore_order = new order($oID);

 

$check_status_query = tep_db_query("select orders_status from " . TABLE_ORDERS . " where orders_id = '" . $oID . "'");

$check_status = tep_db_fetch_array($check_status_query);

if (($check_status['orders_status'] == ORDER_RESTORE_CUSTOMER) || ($check_status['orders_status'] == ORDER_RESTORE_STORE) || ($check_status['orders_status'] == ORDER_CANCEL_CUSTOMER) || ($check_status['orders_status'] == ORDER_CANCEL_STORE)) {

tep_redirect(tep_href_link(FILENAME_ORDERS, 'error_message=' . urlencode(FAIL_ORDER_RECANCEL), 'SSL'));

}

 

$customer_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '" . $oID . "'");

$customer = tep_db_fetch_array($customer_query);

$customer_id = $customer['customers_id'];

tep_session_register('customer_id');

 

$cart = new shoppingCart;

$cart->restore_contents();

 

for ($i=0, $n=sizeof($restore_order->products); $i<$n; $i++) {

$pID = $restore_order->products[$i]['id'];

$qty = $restore_order->products[$i]['qty'];

 

$attributes = array();

if ( (isset($restore_order->products[$i]['attributes'])) && (sizeof($restore_order->products[$i]['attributes']) > 0) ) {

for ($j=0, $n2=sizeof($restore_order->products[$i]['attributes']); $j<$n2; $j++) {

$attribute_options_id_query = tep_db_query("select products_options_name, products_options_id from " . TABLE_PRODUCTS_OPTIONS . " where products_options_name = '" . $restore_order->products[$i]['attributes'][$j]['option'] . "'");

$attribute_options_id = tep_db_fetch_array($attribute_options_id_query);

 

$attribute_options_values_id_query = tep_db_query("select products_options_values_id from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_name = '" . $restore_order->products[$i]['attributes'][$j]['value'] . "'");

$attribute_options_values_id = tep_db_fetch_array($attribute_options_values_id_query);

 

$attributes[$attribute_options_id['products_options_name']] = '{' . $attribute_options_id['products_options_id'] . '}' . $attribute_options_values_id['products_options_values_id'];

}

}

$cart->add_cart($pID, ($cart->get_quantity(tep_get_uprid($pID, $attributes))) + $qty, $attributes, false);

 

if (ORDER_RESTORE_RESTOCK == 'True') {

tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = products_quantity + " . $qty . ", products_ordered = products_ordered - " . $qty . " where products_id = '" . $pID . "'");

}

}

 

if (ORDER_RESTORE_DELETE == 'True') {

tep_db_query("delete from " . TABLE_ORDERS . " where orders_id = '" . $oID . "'");

tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $oID . "'");

tep_db_query("delete from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . $oID . "'");

tep_db_query("delete from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $oID . "'");

tep_db_query("delete from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $oID . "'");

} else {

tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . ORDER_RESTORE_STORE . "' where orders_id = '" . $oID . "'");

 

$customer_notification = (SEND_EMAILS == 'true') ? '1' : '0';

$sql_data_array = array('orders_id' => $oID,

'orders_status_id' => ORDER_RESTORE_STORE,

'date_added' => 'now()',

'customer_notified' => $customer_notification,

'comments' => COMMENTS_DB_RESTORE);

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

}

 

$email_order = sprintf(EMAIL_TEXT_ORDER_RESTORED, $oID) . "\n";

tep_mail($restore_order->customer['firstname'] . ' ' . $restore_order->customer['lastname'], $restore_order->customer['email_address'], sprintf(EMAIL_RESTORE_TEXT_SUBJECT, $oID), nl2br($email_order), STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);

 

// send emails to other people

if (SEND_EXTRA_ORDER_EMAILS_TO != '') {

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, sprintf(EMAIL_RESTORE_TEXT_SUBJECT, $oID), nl2br($email_order), STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);

}

 

tep_session_unregister('customer_id');

 

$messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');

$messageStack->add_session(SUCCESS_ORDER_RESTORE, 'success');

 

if (ORDER_RESTORE_DELETE == 'True') {

$messageStack->add_session(SUCCESS_ORDER_DELETE, 'success');

}

if (ORDER_RESTORE_RESTOCK == 'True') {

$messageStack->add_session(SUCCESS_ORDER_RESTOCK, 'success');

}

if (SEND_EMAILS == 'true') {

$messageStack->add_session(SUCCESS_CUSTOMER_INFORMED, 'success');

}

 

tep_redirect(tep_href_link(FILENAME_ORDERS));

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

 

 

break;

 

======================

 

 

Any thoughts on the code that is missing?

As you see from the image above the editor has done its job and updated the db and added a new table ot_custom. So it looks like we need to somehow include the content form this order tolal instead of the exicting price

 

Andrew

Link to comment
Share on other sites

Andrew,

 

The previous post by boxtel outlines the cause and possible solution for our problem, ie., the price is restored from the catalog price ... not from our edited price.

 

A new session variable and function is needed to tell the cart to restore price from a different location. The logic outlined above makes sense to me, however implementation is another issue.

 

Does this look like the best solution to you?

 

Regards,

EricK

 

 

1) normally with re-order you have something like this:

 

(forget the $systemMessage thing, you would probably use the default messageStack, I discarded that thing long ago)

 

switch ($_GET['action']) {

case 'reorder' : $reorder_result = tep_reorder($_GET['order_id']);

if ($reorder_result == '') {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING));

} else {

$systemMessage = $reorder_result;

}

break;

}

 

 

you replace that with:

 

switch ($_GET['action']) {

case 'reorder' : if ($reorder_id == '') {

// try to refill the cart

$reorder_result = tep_reorder($_GET['order_id']);

if ($reorder_result == '') {

// register the id

if (!tep_session_is_registered('reorder_id')) tep_session_register('reorder_id');

$reorder_id = $_GET['order_id'];

// set success message

$systemMessage = 'Re-Order of Order '.$_GET['order_id'].' Successful.';

// straight to checkout

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING));

} else {

// set message incomplete reorder

$systemMessage = $reorder_result;

}

} else {

// set message reorder still pending

$systemMessage = 'Re-Order Completion Pending for Order '.$_GET['order_id'].', please complete the re-order or empty your basket.';

}

break;

}

 

 

2) in the class shopping cart.php:

 

2A) in the function calculate():

 

you have :

 

$product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");

 

 

you replace that with:

 

if ($reorder_id == '') {

// normal products query

$product_query = tep_db_query("select products_id,

products_price,

products_tax_class_id,

products_weight

from " . TABLE_PRODUCTS . "

where products_id = '" . (int)$products_id . "'");

} else {

// reorder products query for order final price

$product_query = tep_db_query("select p.products_id,

op.final_price as products_price,

p.products_tax_class_id,

p.products_weight

from " . TABLE_PRODUCTS . " p,

" . TABLE_ORDERS_PRODUCTS . " op

where op.products_id = '" . (int)$products_id . "'

and p.products_id = op.products_id

and op.orders_id = '" . (int)$reorder_id . "'");

if (!tep_db_num_rows($product_query)) {

// normal products_query when product not found in the order

$product_query = tep_db_query("select products_id,

products_price,

products_tax_class_id,

products_weight

from " . TABLE_PRODUCTS . "

where products_id = '" . (int)$products_id . "'");

}

}

 

 

2B) in the function get_products():

 

you have:

 

 

$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

 

you replace that with:

 

if ($reorder_id == '') {

// normal products query

$products_query = tep_db_query("select p.products_id,

pd.products_name,

p.products_model,

p.products_image,

p.products_price,

p.products_weight,

p.products_tax_class_id

from " . TABLE_PRODUCTS . " p,

" . TABLE_PRODUCTS_DESCRIPTION . " pd

where p.products_id = '" . (int)$products_id . "'

and pd.products_id = p.products_id

and pd.language_id = '" . (int)$languages_id . "'");

} else {

// reorder products query for order final price

$products_query = tep_db_query("select p.products_id,

op.final_price as products_price,

pd.products_name,

p.products_model,

p.products_image,

p.products_weight,

p.products_tax_class_id

from " . TABLE_PRODUCTS . " p,

" . TABLE_ORDERS_PRODUCTS . " op,

" . TABLE_PRODUCTS_DESCRIPTION . " pd

where op.products_id = '" . (int)$products_id . "'

and p.products_id = op.products_id

and pd.products_id = op.products_id

and pd.language_id = '" . (int)$languages_id . "'

and op.orders_id = '" . (int)$reorder_id . "'");

if (!tep_db_num_rows($products_query)) {

// normal products_query when product not found in the order

$products_query = tep_db_query("select p.products_id,

pd.products_name,

p.products_model,

p.products_image,

p.products_price,

p.products_weight,

p.products_tax_class_id

from " . TABLE_PRODUCTS . " p,

" . TABLE_PRODUCTS_DESCRIPTION . " pd

where p.products_id = '" . (int)$products_id . "'

and pd.products_id = p.products_id

and pd.language_id = '" . (int)$languages_id . "'");

}

}

 

You may have to do something about the specials query in there but I no longer use the specials table so have not tested it.

 

 

2C) in both functions you add the variable $reorder_id to the globals declaration so that the functions can access it.

 

3) in checkout_process.php just after:

 

$cart->reset(true);

 

you add :

 

tep_session_unregister('reorder_id');

 

to remove the reorder_id after order completion

 

 

4) and in application_top.php at the end somewhere you add:

 

// remove reorder id if cart goes empty

if ($cart->count_contents() < 1) tep_session_unregister('reorder_id');

 

so that the reorder_id is removed if the cart becomes empty.

Treasurer MFC

Link to comment
Share on other sites

Thank you Amanda (boxtel) for your help, this works great! Here are slight changes to above post (modifications to Order Re-Order) that allow me to restore edited price to the cart:

 

Step 1 - file includes/application_top.php

 

Replace this:

 

case 'reorder' : $reorder_result = tep_reorder($HTTP_GET_VARS['order_id']);

if ($reorder_result == '') {

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

} else {

/echo $reorder_result; // print results if not all products added

}

break;

 

with this:

 

case 'reorder' : if ($reorder_id == '') {

// try to refill the cart

$reorder_result = tep_reorder($HTTP_GET_VARS['order_id']);

if ($reorder_result == '') {

// register the id

if (!tep_session_is_registered('reorder_id')) tep_session_register('reorder_id');

$reorder_id = $HTTP_GET_VARS['order_id'];

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING));

} else {

echo $reorder_result; // print results if not all products added

}

} else {

echo 'Pending reorder:'.$reorder_id;

}

break;

 

Step 2A, 2B - see above, changes are for classes/shopping_cart.php

 

Step 2C - in the file classes/shopping_cart.php add the variable $reorder_id to the globals cart functions calculate() and get_products():

 

find function calculate() {

 

and below that find "global" then add $reorder_id ...

 

global $sppc_customer_group_id, $reorder_id; // add $reorder_id

 

find function get_products() {

 

global $languages_id, $reorder_id; // add $reorder_id

 

Step 3, 4 -see above

 

Once again, thank you boxtel :wub: for this contribution, and for your support!

With kind regards,

EricK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...