kustomjs Posted October 12, 2008 Share Posted October 12, 2008 alright I am getting this error: Fatal error: Call to undefined function tep_create_rma_value() on /return_product.php on line 45 is there a fix for this? Quote Link to comment Share on other sites More sharing options...
kustomjs Posted October 12, 2008 Share Posted October 12, 2008 its in this piece of code: // carry out a query on all the existing orders tables, to get the required information $rma_create = tep_create_rma_value(11); Quote Link to comment Share on other sites More sharing options...
kustomjs Posted October 13, 2008 Share Posted October 13, 2008 anybody? Quote Link to comment Share on other sites More sharing options...
kustomjs Posted October 13, 2008 Share Posted October 13, 2008 is anybody going to help or not? I am getting this error: Fatal error: Call to undefined function tep_create_rma_value() on /return_product.php on line 45 is there a fix for this? its in this piece of code: // carry out a query on all the existing orders tables, to get the required information $rma_create = tep_create_rma_value(11); Quote Link to comment Share on other sites More sharing options...
kustomjs Posted October 14, 2008 Share Posted October 14, 2008 I am keep on replying to this topic intill I get my problem fix. Quote Link to comment Share on other sites More sharing options...
ujjaval_modi Posted October 14, 2008 Share Posted October 14, 2008 (edited) Can I use this contribution to perform product exchanges ? :( I mean return one product and in exchange you get another one ?? Sorry I cannot go through complete forum as there are lot of pages in it. So please can anyone let me know this much ! Edited October 14, 2008 by ujjaval_modi Quote Manpower moves wrenches, horsepower moves cars, and the power of the mind moves the world ! Link to comment Share on other sites More sharing options...
kustomjs Posted October 14, 2008 Share Posted October 14, 2008 this contribution really doesn't have any support I have been asking for 3 days straight with the current problem I got Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted October 14, 2008 Share Posted October 14, 2008 this contribution really doesn't have any support I have been asking for 3 days straight with the current problem I got Tim, you are a member for two years now. All this time I guess you might have been working on this and after all this time you still haven't learned a thing or two about PHP? Are you still without a clue that if PHP tells you a function is undefined it means that function is not found in any of the files that are included when making a page. Bottom line: you haven't completed all of the instructions and didn't add that function (or to the wrong file like in the admin instead of catalog side). Using Google when you have an error is not a bad idea either but reading a book about PHP getting to know the basics will be really helpful when adding contributions. It will save you a lot of frustration (feeling helpless). I bet in the end it will save you more time that it will cost you. Quote Link to comment Share on other sites More sharing options...
kustomjs Posted October 14, 2008 Share Posted October 14, 2008 (edited) I have changed the file around and I made sure that I looked at read me file and I changed the code and still getting the error. for what ever reason in the catalog/return_product.php where its bolded at where my problem is. here what I dont understand if ($HTTP_GET_VARS['action']) { switch ($HTTP_GET_VARS['action']) { case 'insert': case 'update': // carry out a query on all the existing orders tables, to get the required information $rma_create = tep_create_rma_value(11); $returns_status_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_RETURN_STATUS_ID'"); $default_return = tep_db_fetch_array($returns_status_query); $order_returns_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op where o.orders_id = op.orders_id and o.orders_id = '" . $HTTP_GET_VARS['oID'] . " ' and op.products_id = '" . $HTTP_GET_VARS['products_id'] . "'"); $orders_return = tep_db_fetch_array($order_returns_query); if ($HTTP_POST_VARS['returns_quantity'] > $orders_return['products_quantity']) { tep_redirect(tep_href_link(FILENAME_RETURN, 'error=yes&order_id=' . $HTTP_GET_VARS['oID'] . '&products_id=' . $HTTP_GET_VARS['products_id'])); } $customers_id = $orders_return['customers_id']; $rma_value = tep_db_prepare_input($rma_create); $order_id = $HTTP_GET_VARS['oID']; $customers_name = $orders_return['customers_name']; $customers_acct = $orders_return['customers_acct']; Edited October 14, 2008 by kustomjs Quote Link to comment Share on other sites More sharing options...
kustomjs Posted October 14, 2008 Share Posted October 14, 2008 anybody? Quote Link to comment Share on other sites More sharing options...
homewetbar Posted October 14, 2008 Share Posted October 14, 2008 I have changed the file around and I made sure that I looked at read me file and I changed the code and still getting the error. You forgot something in the install like the previous poster pointed out. It is likely NOT in that file but in another file that this file references SO go back over ALL the install directions for ALL the files as you missed something. Quote Most Valuable OsCommerce Contributions: Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294 FedEx Automated Labels -- Contribution 2244 RMA Returns system -- Contribution 1136 Sort Products By Dropdown -- Contribution 4312 Ultimate SEO URLs -- Contribution 2823 Credit Class & Gift Voucher -- Contribution 282 Cross-Sell -- Contribution 5347 Link to comment Share on other sites More sharing options...
homewetbar Posted October 14, 2008 Share Posted October 14, 2008 Can I use this contribution to perform product exchanges ? :( I mean return one product and in exchange you get another one ?? Sorry I cannot go through complete forum as there are lot of pages in it. So please can anyone let me know this much ! No it does not handle exchanges. Although that would be great if you could add it as a feature! Quote Most Valuable OsCommerce Contributions: Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294 FedEx Automated Labels -- Contribution 2244 RMA Returns system -- Contribution 1136 Sort Products By Dropdown -- Contribution 4312 Ultimate SEO URLs -- Contribution 2823 Credit Class & Gift Voucher -- Contribution 282 Cross-Sell -- Contribution 5347 Link to comment Share on other sites More sharing options...
Jan Zonjee Posted October 14, 2008 Share Posted October 14, 2008 anybody? A. Bumping is not allowed on the osC forums! B. Please try to learn something yourself instead of waiting to be spoon fed. The link brings you to a tutorial part on functions but maybe you start from the beginning. Quote Link to comment Share on other sites More sharing options...
ujjaval_modi Posted October 15, 2008 Share Posted October 15, 2008 HI Everyone, Thanx for all your replies ! I have installed the contribution successfully and it works perfectly as I need. Quote Manpower moves wrenches, horsepower moves cars, and the power of the mind moves the world ! Link to comment Share on other sites More sharing options...
enio Posted October 24, 2008 Share Posted October 24, 2008 hi i have one small problem, one customer made rma and he get new product, now the product has broken again, now he can not make rma again, is any way to close or delete the previous rma and make another? Quote Link to comment Share on other sites More sharing options...
homewetbar Posted October 30, 2008 Share Posted October 30, 2008 hii have one small problem, one customer made rma and he get new product, now the product has broken again, now he can not make rma again, is any way to close or delete the previous rma and make another? You don't. The system only handles 1 rma. I would be nice if someone could add a feature to reopen a ticket... Quote Most Valuable OsCommerce Contributions: Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294 FedEx Automated Labels -- Contribution 2244 RMA Returns system -- Contribution 1136 Sort Products By Dropdown -- Contribution 4312 Ultimate SEO URLs -- Contribution 2823 Credit Class & Gift Voucher -- Contribution 282 Cross-Sell -- Contribution 5347 Link to comment Share on other sites More sharing options...
Eighteen48 Posted November 8, 2008 Share Posted November 8, 2008 Maybe it is just me, but I am confused but the second set of instructions for step 1 for the catalog/account_history_info.php file. Find this text: <?php } for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { Further below is another line (if you haven't customised your install!, otherwise, the first if statement, then the else!)... Note also, that appears more then once in the file: if (sizeof($order->info['tax_groups']) > 1) { Replace the text, looking for the corresponding } to the above statement, insert the following, comparing the text below with any other customisations. This is the tricky bit, look carefully at the changes, you'll be able to match the echos somewhere in the file. // Begin RMA Returns if ($order->products[$i]['return'] == '1') { $rma_query_one = tep_db_query("SELECT returns_id FROM " . TABLE_RETURNS_PRODUCTS_DATA . " where products_id = '" . $order->products[$i]['id'] . "' and order_id = '" . $HTTP_GET_VARS['order_id'] . "'"); $rma_query = tep_db_fetch_array($rma_query_one); $rma_number_query = tep_db_query("SELECT rma_value FROM " . TABLE_RETURNS . " where returns_id = '" . $rma_query['returns_id'] . "'"); $rma_result = tep_db_fetch_array($rma_number_query); $return_link = '<b>' . TEXT_RMA . ' # <u><a href="' . tep_href_link(FILENAME_RETURNS_TRACK, 'action=returns_show&rma=' . $rma_result['rma_value'], 'NONSSL') . '">' . $rma_result['rma_value'] . '</a></u></b>'; } else { $return_link = '<a href="' . tep_href_link(FILENAME_RETURN, 'order_id=' . $HTTP_GET_VARS['order_id'] . '&products_id=' . ($order->products[$i]['id']), 'NONSSL') . '"><b><u>' . TEXT_RETURN_PRODUCT .'</a></u></b>'; } // Don't show Return link if order is still pending or processing // You can change this or comment it out as best fits your store configuration // My first contribution to anything open source, a bug fix to a long running RMA system. These were the changes I had to make to get it to work with a 2.2MS2 install. if (($orders_status == '1') OR ($orders_status == '2') ) { $return_link = ''; } echo ' <tr>' . "\n" . ' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="main" valign="top">' . $order->products[$i]['name']; if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>'; } } echo $return_link; // JLM: End RMA Returns echo '</td>' . "\n"; Am I just replacing the code for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { with the above code or all of the code up to the "}"? Quote Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0 Link to comment Share on other sites More sharing options...
homewetbar Posted January 13, 2009 Share Posted January 13, 2009 Quick fix for the bug when you create a ticket in admin the prefered return method is not stored. Here is a quick fix hopefully someone can include in the next release admin/return_product.php FIND: $returns_payment_sql = array('returns_id' => $ticket_id, 'refund_payment_name' => $refund_method, 'refund_payment_value' => $final_price, ADD AFTER: 'customer_method' => $refund_method, That's it, and now your customer's prefered return method should be stored. Enjoy! Quote Most Valuable OsCommerce Contributions: Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294 FedEx Automated Labels -- Contribution 2244 RMA Returns system -- Contribution 1136 Sort Products By Dropdown -- Contribution 4312 Ultimate SEO URLs -- Contribution 2823 Credit Class & Gift Voucher -- Contribution 282 Cross-Sell -- Contribution 5347 Link to comment Share on other sites More sharing options...
DAVID3733 Posted January 21, 2009 Share Posted January 21, 2009 Hi there I have re-read the topic a few times but cant find the solution to my problem. I have a new quite heavliy modified test site that i am trying to add this contribution to, i have installed a few times but still same problem, when the link is clicked to Schedule a return, either from the clients side or admin, the page just returns with no info apart from the title and left colum etc (\admin\return_product.php & return_product.php). There does not appear to be any error messages in apache or php logs and it looks like both the order id and product id are being passed over in the address. using 2.2rc2a Multi-store CCgv 5.21 Ajax Order editor Ultimate seo v2.6 (switched off) I have previously installed on MS2 and its working fine still from about a year ago Really pulling my hair out on now, and there not much left, so please if anybody could point me in the right direction i would be grateful, i am guessing its a silly mistake i have made but i am still learning. Thank you Quote David Link to comment Share on other sites More sharing options...
paulchen2005 Posted January 30, 2009 Share Posted January 30, 2009 Hi, this contrib dont work with attribute and it work not with QTpro... what must i change to work with it? thank you Quote Link to comment Share on other sites More sharing options...
newbieonekenobie Posted February 17, 2009 Share Posted February 17, 2009 I was about to install the 2.6 version of this contribution and noticed a discrepancy in the "find" this code an "replace" with this code for updating the account_history_info.php file in a just installed version of 2.2RC2 (no other contributions installed). Code to find in the account_history_info.php file - per the contribution $customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'"); $customer_info = tep_db_fetch_array($customer_info_query); if ($customer_info['customers_id'] != $customer_id) { tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); } Code I find in the account_history_info.php file $customer_info_query = tep_db_query("select o.customers_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_STATUS . " s where o.orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1'"); $customer_info = tep_db_fetch_array($customer_info_query); if ($customer_info['customers_id'] != $customer_id) { tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); } Says to replace with this code... $customer_info_query = tep_db_query("select customers_id, orders_status from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'"); $customer_info = tep_db_fetch_array($customer_info_query); $orders_status = $customer_info['orders_status']; if ($customer_info['customers_id'] != $customer_id) { tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); } Am concerned, any suggestions? Joe Quote Link to comment Share on other sites More sharing options...
homewetbar Posted February 18, 2009 Share Posted February 18, 2009 I was about to install the 2.6 version of this contribution and noticed a discrepancy in the "find" this code an "replace" with this code for updating the account_history_info.php file in a just installed version of 2.2RC2 (no other contributions installed). Code to find in the account_history_info.php file - per the contribution $customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'"); $customer_info = tep_db_fetch_array($customer_info_query); if ($customer_info['customers_id'] != $customer_id) { tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); } Code I find in the account_history_info.php file $customer_info_query = tep_db_query("select o.customers_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_STATUS . " s where o.orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1'"); $customer_info = tep_db_fetch_array($customer_info_query); if ($customer_info['customers_id'] != $customer_id) { tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); } Says to replace with this code... $customer_info_query = tep_db_query("select customers_id, orders_status from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'"); $customer_info = tep_db_fetch_array($customer_info_query); $orders_status = $customer_info['orders_status']; if ($customer_info['customers_id'] != $customer_id) { tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); } Am concerned, any suggestions? Joe You have a modified oscommerce install it looks like so you will have to adapt the code to your site... Quote Most Valuable OsCommerce Contributions: Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294 FedEx Automated Labels -- Contribution 2244 RMA Returns system -- Contribution 1136 Sort Products By Dropdown -- Contribution 4312 Ultimate SEO URLs -- Contribution 2823 Credit Class & Gift Voucher -- Contribution 282 Cross-Sell -- Contribution 5347 Link to comment Share on other sites More sharing options...
newbieonekenobie Posted February 18, 2009 Share Posted February 18, 2009 You have a modified oscommerce install it looks like so you will have to adapt the code to your site... No modifcations have been made to the account_history_info.php or any other files on the site (fresh install). The RC2a code matches the code I have from the RC2 install but does not match the code referenced in the RMA contribution. What version of OSC was the mod written for? Joe Quote Link to comment Share on other sites More sharing options...
ianric Posted February 19, 2009 Share Posted February 19, 2009 Hi I have installed the contrib but I get the login page errors. In account_histoty_info I click the return link, make the changes, submit and I get logged out and go back to the front page with no sign of RMA number. I do get the email with RMA info in tho. The next prob is with track return. I copy and paste the RMA number from the email into the form and pick track. I get asked to login twice and then the error "The details you entered do not match any of our records. Please try again or contact us for further assistance." I have searched this forum and tried several suggested fixes but non have worked. Is there anyone that can help me. Cheers Ian Still no answers?? I still can't get this bit to work properly. The admin side still works tho. I am redesigning starting from scratch with 2.2rc2a and installing same contribs. I found 1.3 wishlist contrib gave a parse error but couldn't see what was wrong, I am using it on my live store and it all works. Anyway, when I looked closer the contrib coder used a mix of PHP short open tags ie some were <? and others were <?php I even enabled short open tags in my php.ini file but it still didn't work so I replaced all the <? in each file and it worked. This contrib has been written the same. Stacks of short tags mixed with normal tags. I thought I'd cracked it but unfortunatly it still didn't work when I corrected all the <? although I haven't used the fix suggested earlier in the forum. Not really expecting it to work :blink: Maybe that's a clue to solving this prob. Hope some one can solve. @ newbieonekenobie - I found the same. I replaced the code anyway and it seemed to work. Not sure if it's 100% because of this login error but try it, can't hurt Cheers Ian Quote Link to comment Share on other sites More sharing options...
newbieonekenobie Posted February 22, 2009 Share Posted February 22, 2009 Still no answers?? I still can't get this bit to work properly. The admin side still works tho. I am redesigning starting from scratch with 2.2rc2a and installing same contribs. I found 1.3 wishlist contrib gave a parse error but couldn't see what was wrong, I am using it on my live store and it all works. Anyway, when I looked closer the contrib coder used a mix of PHP short open tags ie some were <? and others were <?php I even enabled short open tags in my php.ini file but it still didn't work so I replaced all the <? in each file and it worked. This contrib has been written the same. Stacks of short tags mixed with normal tags. I thought I'd cracked it but unfortunatly it still didn't work when I corrected all the <? although I haven't used the fix suggested earlier in the forum. Not really expecting it to work :blink: Maybe that's a clue to solving this prob. Hope some one can solve. @ newbieonekenobie - I found the same. I replaced the code anyway and it seemed to work. Not sure if it's 100% because of this login error but try it, can't hurt Cheers Ian Thanks Ian...I did do as you suggested but ran into other issues. Starting over to determine if made the changes correctly. Will let you know. Joe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.