Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

In URL how can I eliminate the order_id from being displayed


sales

Recommended Posts

Posted

When my order.php module links to the pdf_invoice.php module I want to eliminate the oID=number from displaying or being re-entered.

 

www.mywebsite.com//admin/pdf_invoice.php?oID=96

 

Does anyone know how to do this?

 

Below is my code:

 

echo '<a href="' . tep_href_link(FILENAME_PDF_INVOICE, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice_pdf.gif', IMAGE_ORDERS_INVOICE) . '</a>';

 

Thanks

 

Rick

Posted

put // before the echo and that should switches off the whole link

 

'oID=' . $HTTP_GET_VARS['oID'] is the code that gives oID=96

 

 

so to remove just oID=96, i would delete 'oID=' . $HTTP_GET_VARS['oID']

 

remember to do a back up first, try the above out and you can always put it back if it doesn't work

Getting better with mods but no programmer am I.

Posted

I tried you suggestion of removing the 'oID=' but it errors out when linking to the pdf_invoice.php module. It looks like it needs the 'oID=' in the URL to process the order_id. Do you have any other suggestions?

 

Thanks

 

Rick

Posted

it errors out when linking to the pdf_invoice.php module. It looks like it needs the 'oID=' in the URL to process the order_id.

Of course it does. The oID= is telling the invoice.php file which order to print. There is likely no way short of a POST to not show it.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

I'm fairly new to PHP coding... In my code (see below) what would i need to change for the POST?

 

echo '<a href="' . tep_href_link(FILENAME_PDF_INVOICE, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice_pdf.gif', IMAGE_ORDERS_INVOICE) . '</a>';

Posted

I'm fairly new to PHP coding... In my code (see below) what would i need to change for the POST?

 

echo '<a href="' . tep_href_link(FILENAME_PDF_INVOICE, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice_pdf.gif', IMAGE_ORDERS_INVOICE) . '</a>';

Nothing. You would have to completely redo the area around that code. POST is done in forms and this is a link code. You would also have to change the code in orders.php to post it, and the code in pdf_invoice.php to accept it.

 

Why do you want to do all that, anyway?

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

I've modified the pdf_invoice.php to display medical information and if a customer changs the order_id number to another number they can see medical information about another customer. I need to lock down this medical information.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...