Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
elahurd

using tep_remove_order

Recommended Posts

So I'd like to use tep_remove_order in my payment method, but it is only in the admin/includes/functions/general.php file...I noticed none of the other payment methods ever use it. I tried including admin/includes/application_top.php as opposed to includes/application_top.php like other payment methods used, but I get errors. I'm able to just paste the function in where I need it, but I'd like to just be able to include the original instance of it. Any idea what I might be doing wrong? The error I get comes from this line (78) in admin/includes/application_top.php:

require(DIR_WS_CLASSES . 'logger.php');

This file is only in the admin/includes/classes folder and not in the includes/classes folder. The admin/includes/application_top.php file seems to be including the non-admin config file...so I'm not sure how to include this tep_remove_order function.

Thanks in advance.

Share this post


Link to post
Share on other sites

I'm not sure what your trying to do, but the easiest thing would be to copy that function as found in the admin into the catalog side, probably paste it into catalog/includes/functions/general.php ~ however, if the function has any dependencies of other classes or functions found only in the admin, you will have to port them over to the catalog side as well.


Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Share this post


Link to post
Share on other sites

I'm trying to use tep_remove_order( ) without having to copy the function anywhere...just simply by including the file it's in. Are any of the admin files even meant to be included? Because I always seem to get errors.

Share this post


Link to post
Share on other sites

I told you how to do it properly. Don't know why you would want to go about it wrong.

 

But hey, what do I know, lets just pull all kinds of files from the admin and replicate and override existing classes the site needs to run properly. Go for it!


Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×