X-Cart Snippets

X-Cart Snippets


X-Cart Snippets. More snippets will follow soon...

Products


301 Redirects With X-Cart Clean URLs

301 Redirects With X-Cart Clean URLs

How to redirect an old URL to a new URL (for when using the X-Cart Clean URLs module) ...

Block IP Addresses or Referring Domains

Block IP Addresses or Referring Domains

A quick and easy method to block specific or ranges of IP addresses or referring domains, via your root .htaccess file.

Change next order ID value

Change next order ID value

If you've just opened a new store, you may not want customers to see low order ID's.

Detect HTTPS mode in PHP

Detect HTTPS mode in PHP

Detect HTTPS mode in PHP

Detect HTTPS mode in Smarty

Detect HTTPS mode in Smarty

If you get a security alert when in secure mode, it's usually due to offsite elements such as SSL certificate seals, images and javascript that are not secure, in which case you can fix with this code...

Enable Debug Console for Specific IP Address Only

Enable Debug Console for Specific IP Address Only

Gives you a private debug console for a specific IP address, so as not to disturb customer view...

Export ALL Database Tables in DB Export

Export ALL Database Tables in DB Export

You may have other non X-Cart tables present in your database. This will dump them ALL from DB export tool in admin.

Handy Parcel Tracking Mod

Handy Parcel Tracking Mod

A quick and easy way to add a parcel tracking box to your store.

Price Adjustment - Round Up - Deduct 0.01

Price Adjustment - Round Up - Deduct 0.01

SQL patch to adjust price, round up to nearest, then deduct a cent or penny etc.

Protect company emails from spambots

Protect company emails from spambots

This will encode your company email addresses...

Redirect to HTTPS

Redirect to HTTPS

With Google giving a ranking boost to secure websites, here is how to automatically redirect to HTTPS...

Redirect URLs to www.

Redirect URLs to www.

To avoid duplicate URLs, use this to redirect non-www. URLs to www.