How to Calculate Certain Period Net Sale for Zen-Cart

At the end of every month we need to know how much we have earned, or how much we have sold every day, in a year for our Zen-Cart based shop cart. Usually we have to login our admin panel, and check the total orders we have sold at the certain time. We have to download the xml files, and add all the orders together; hen deleted the unpaid orders, and canceled orders. It will take us a lot of time and energy.

Here let me teach you how to use mysql command to achieve this, only one sentence if only need to know the net sales, say in a month, from “2012-04-01″ to “2012-04-30″, we can use the following code: Continue reading

Posted in Mysql, Zen-Cart | Comments Off

Bulk register users for vbulletin.

Sometimes we need to register a lot of new users for our forum based on vbulletin. How to do then? Here, I will share my methods with you.

1. arrange the new user names in at .txt file, one line only display one user name;
2. create a .xml file and upload the .txt data;
3. resave the .xml file as .csv file;
4. run phpmyadmin, and creat a table under your vbuletin database, and import the .csv file to the new table; Continue reading

Posted in Vbulletin | Comments Off

How to install multi wordpress blog under one database?

Sometimes we only have one mysql database, and we have several domain names. How to install wordpress for each domain under one database then?

Here is an example, say:   www.eyewearsaver.com, www.opticalsaver.com, www.eyeglassessaver.com, www.eyewearsave.com, and www.glassessaver.com. Continue reading

Posted in WordPress | Comments Off

Zen-Cart Homepage Shows “Sorry, the product was not found.”

Today I found a funny thing, when I visit www.bestpriceglasses.com,  the site shows: “Sorry, the product was not found.”, at the same time, the homepage jump to a detailed product page, the url is: bestpriceglasses.com/index.php?main_page=product_info&products_id=35. Continue reading

Posted in Zen-Cart | Comments Off

Disable Directory Browsing with .htaccess

If there is no default homepage, such as index.htm, index.html, index.php, and so on, all the documents and files will be listed. Hackers often use this to find backdoor for them to hack a web site.

If you are using a linux related web hosting, you can use .htaccess to disable directory browsing. Just add the following code at the beginning of .htaccess: Continue reading

Posted in PHP Code | Comments Off

How to reset zen-cart admin password?

If you lost your zen-cart admin password, and you can not reset the new passwords via email either, how to do then? We can reset the admin passwords via phpmyadmin.

If your zen-cart is v1.3.9.h or older, open your phpMyAdmin (supplied by your hosting company), select your store’s database, then click the “SQL” tab and run this query:
DELETE FROM admin WHERE admin_name = 'Admin'; INSERT INTO admin (admin_name, admin_email, admin_pass, admin_level) VALUES ('Admin', 'admin@localhost', '351683ea4e19efe34874b501fdbf9792:9b', 1); Continue reading

Posted in Zen-Cart | Comments Off

X-cart Customer Also Bought Settings Method

We need to 2 steps to set Customer Also Bought of X-cart. Fist login admin panel and go to Settings –> Appearance –> Count of columns in simple product list, and Fill in 2, then the products will display in 2 columns.

Second aslo at admin panel, go to Settings –> Modules –> Recommended Products, and click “Configure”, “Number of products to be displayed in recommended products list”, fill in 6, if you like to show 6 products.

The above method is tested successfully under X-Cart Gold V4.4.4

Posted in X-Cart | Comments Off

How to delete Zen-Cart un-approved Product Reviews in Bulk?

If there are so many spam products reviews, we can not delete them one by one. We will spend a lot of time if we do so. We can using mysql command to delet the spam or un-approved zen-cart reviews in bulk.

The product review id is save at 2 tables: reviews and reviews_description, the review status is save in pres_reviews, if the status is “0″, it means the review is not approved yet. And the reviews details is saved in reviews_description. Continue reading

Posted in Zen-Cart | Comments Off

Is there any way I can change this Auth Code of X-cart ?

After a long time of the installaction, we may have fogor the Auth Code, then we can not reinstall the old x-cart. Is there any way I can change this Auth Code then?

The answer is yes!
You can edit …/store/include/install.php.
Open install.php under include, $installation_auth_code = “xxxx”; xxxx will be your Auth Code.

Note: Perhaps it would be best to delete or otherwise make inaccessible the www.yoursite.com/xcart/install.php file.

Posted in X-Cart | Comments Off

How to Disable Drupal User Registration

If you do not like others to register your drupal based websites, login your drupal based website admin panel. Go to User management -> User settings.

Under Public registrations, choose “Only site administrators can create new user accounts.”

Save and done. I have tested Drupal 6.22.

Posted in PHP Code | Comments Off