Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Deprecated error in recover cart sales


14steve14

Recommended Posts

Posted

I am now getting a deprecated error wanring with this bit of code in the recover carts module. I have searched for an answer, but cant seem to find anything.

 

if ( ereg( "customer_id[^\"]*\"([0-9]*)\"", $ses['value'], $custval ) )

 

 

 

I know that ereg becomes preg_match but i just cant figure out the rest.

 

Can someone help me sort this out please.

REMEMBER BACKUP, BACKUP AND BACKUP

Posted

Just looked at the code in my 2.3.1 test store and it is exactly the same, but i am not getting the error as i am on the RC2a sore.

REMEMBER BACKUP, BACKUP AND BACKUP

Posted

Try

preg_match( "/customer_id[^\"]*\"([0-9]*)\"/", $ses['value'], $custval ) )

Also, the return should be checked against FALSE so it should be

if ( preg_match( "/customer_id[^\"]*\"([0-9]*)\"/", $ses['value'], $custval )   !== FALSE)

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted

Jack

 

You are a star. Many thanks it worked both ways. I have no idea why i do not get the error on 2.3.1. Still never mind, it works again.

REMEMBER BACKUP, BACKUP AND BACKUP

Archived

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

×
×
  • Create New...