Paypal Website Payment Pro Module (UK & US) – Free Prestashop Module

December 22nd, 2009

This module is based on the beta version of Paypal Direct API which developed by Paul Campbell. We have improved and enhanced 3D Secure authentication… This is very important for UK’s user as from the 1st January 2010, 3D secure authentication must be implemented for customers who pay by Visa or Maestro card.

Introduction:

Paypal Website Payments Pro allows you to accept payment directly on your website or by phone, fax and mail. Customers can pay you with all major debit and credit cards as well as PayPal balance and bank transfers.

With this solution you get all the benefits of a merchant account and gateway in one solution. This package should also include PayPal Express Checkout which enables buyers to checkout in as little as three click, however, for this initial version v1.0.0 we have not included this on the checkout page.

In order to use this Paypal WPP Module for Prestashop, you need

  1. Prestashop version 1.2.5 (older version need  to update the Tools.php class..)
  2. Signup Paypal Website Payment Pro account
  3. Signup Cardinal Centinel for 3D secure (note: Paypal use Cardinel Centinel to handle 3D secure authentication)

For testing purpose you can setup Paypal Sandbox and Cardinel Centinel sandbox account.

 

Paypal WPP Pro Module’s key features:

  • Accept payment directly on your website
  • 3D secure authentication implemented (Visa verified & Mastercard secure for UK)
  • Accept payment in various currencies (Pounds, USD , Euro, Canadian Dollar, Yen etc..)

Demo

We installed this module on prestashop 1.208. You need to add a missing function getHttpHost() to get it working (Read this comment #comment-676) . Latest version 1.2.5 should be fine. See LIVE DEMO here…. Paypal Website Payment Pro UK

Screenshots

(the screenshots took from my live site.. you may see it differently on yours)

Feedback

Your feedback is really appreciated. We have spent a lot of time to create this module and distribute it to our Prestashop Community.  

Download

Free Prestashop Payment Module - Paypal Website Payment Pro UK (1039)

 

Test cards

Centinel Integration Guide (469)

 

That’s it from us @ Quay Creative.

Categories: E-commerce, Prestashop | Tags: , , , , , | 83 Comments

Categories for homepage – Free Prestashop Module

November 16th, 2009

Quay Creative ecommerce solutions has just released the first Prestashop module.. it is absolutely FREE.

This module is to show all main categories (level 1) on your homepage. You can declare number of categories to show. CSS is also provided, however, you can restyle it as desire.

screenshot

Please follow this link to download – Free prestashop module

Categories: E-commerce, Prestashop | Tags: , , , , | 1 Comment

Google e-commerce tracking modification for Tradingeye and UK2.net ecommerce package

November 16th, 2008

his modification is for Tradingeye accessible e-commerce system and the latest UK2.net E-commerce package to help you track visitor movement through checkout pages. To get better understanding and the benefit of this feature, please refer to these 2 article as below:

google ecommerce tracking code for Tradingeye and Uk2 ecommerce

1. Google Ecommerce Tracking Code

2. Analytics Talk

Now, please follow these steps

Step 1: Enabling E-Commerce Reporting in the Profile

The first step of tracking e-commerce transactions is to enable e-commerce reporting for your website’s profile. To enable e-commerce reporting, please follow these steps:

Log in to your account.
Click Edit next to the profile you’d like to enable.
On the Profile Settings page, click edit next to Main Website Profile Information.
Change the E-Commerce Website radio button from No to Yes.

Step 2: Receipt Page Format

Tradingeye and UK2.net payment process is slightly different from others. Once customer completed their transaction, he will be taken to an acknowlegdement (thank-you)  page rather than a receipt page. He then has to click on the link “view your receipt” to see his receipt. Thus, we need to modifify these following files:

/modules/ecom/templates/main/orderProcessed.tpl.htm
/modules/ecom/classes/main/receipt.php

Lets get the ball rolling!

2.1: Place this code below at the bottom of the file orderProcessed.tpl.htm

<pre lang=”html”><!– BEGIN TPL_GOOGLE_ECOMMERCE_TRACKING_BLOCK –>
<script type=”text/javascript”><!–

var gaJsHost = ((“https:” == document.location.protocol ) ? “https://ssl.” : “http://www.”);
document.write(unescape(“%3Cscript src=’” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));

// –></script>

<script type=”text/javascript”><!–
var pageTracker = _gat._getTracker(“UA-4440573-2″);
pageTracker._initData();
pageTracker._addTrans(
“{TPL_VAR_ORDER_ID}”, // order ID – required
“{TP_VAR_STORE_NAME}”, // affiliation or store name
“{TPL_VAR_TOTAL}”, // total – required
“{TPL_VAR_TAX_TOTAL}”, // tax
“{TPL_VAR_SHIPPING_COST}”, // shipping
“{TPL_VAR_CITY}”, // city
“{TPL_VAR_COUNTY}”, // state or province
“{TPL_VAR_COUNTRY}” // country
);

// add items might be called for every item in the shopping cart
<! BEGIN TPL_GOOGLE_ADDITEM_BLK –>
pageTracker._addItem(
“{TPL_VAR_ORDER_ID}”, // order ID – required
“{TPL_VAR_SKU_CODE}”, // SKU/code
“{TPL_VAR_PRODUCT_TITLE}”, // product name
“{TPL_VAR_CATEGORY}”, // category or variation
“{TPL_VAR_PRODUCT_PRICE}”, // unit price – required
“{TPL_VAR_QUANTITY}” // quantity – required
);
<!– END TPL_GOOGLE_ADDITEM_BLK –>
pageTracker._trackTrans(); //submits order info in hidden form after page load
// –></script>
<!– END TPL_GOOGLE_ECOMMERCE_TRACKING_BLOCK –></pre>

You need to replace this “UA-xxxxxx-xx” to your own Google Tracking ID

2.2:  Modify the receipt.php class.

Under the method (function) m_orderProcessed()

At Line 47, Look for:


<pre lang=”php”>

#DECLARE BLOCKS $this->ObTpl->set_block(“TPL_ORDER_FILE”,”TPL_ORDERSTATUS_BLK”,”orderstatus_blk”);

$this->ObTpl->set_block(“TPL_ORDER_FILE”,”TPL_BACKORDER_BLK”,”backorder_blk”);

<pre>

And add:

<pre lang=”php”>

$this->ObTpl->set_block(“TPL_ORDER_FILE”,”TPL_GOOGLE_ECOMMERCE_TRACKING_BLOCK”,”google_blk”);

$this->ObTpl->set_block(“TPL_GOOGLE_ECOMMERCE_TRACKING_BLOCK”,”TPL_GOOGLE_ADDITEM_BLK”,”item_blk”);

$this->ObTpl->set_var(“google_blk”,”");
$this->ObTpl->set_var(“item_blk”,”");

</pre>


Look for this comment

#FLAG TO INDICATE SEPERATE BACKORDER AND NORMAL ORDER

and replace all the code from there to

<pre lang=”php”>$this->ObTpl->set_var(“TPL_VAR_BACKORDERURL”,$backOrderUrl);</pre>

by the code below:

<pre lang=”php”>#FLAG TO INDICATE SEPERATE BACKORDER AND NORMAL ORDER
$_SESSION['backOrderSeperate']=$this->libFunc->ifSet($_SESSION,’backOrderSeperate’,'0′);
$this->obDb->query = “SELECT count(*) as cnt  FROM “.TEMPCART.” WHERE  vSessionId=’”.$this->sessionId.”‘”;
$rowCount=$this->obDb->fetchQuery();

if($_SESSION['backOrderSeperate']==1 && $rowCount[0]->cnt>0)
{
$this->ObTpl->parse(“backorder_blk”,”TPL_BACKORDER_BLK”);
}
else
{

#GETTING INVOICE DETAIL AND ADD TO GOOGLE ECOMMERCE API
$this->obDb->query = “SELECT tmOrderDate,vPayMethod,vShipDescription,fShipTotal,”;
$this->obDb->query.= “vFirstName,vLastName,vEmail,vAddress1,vAddress2,vCity,iInvoice,”;
$this->obDb->query.= “vState,vStateName,vCountry,vZip,vCompany,vPhone,vHomepage,”;
$this->obDb->query.= “vAltPhone,fCodCharge,fPromoValue,”;
$this->obDb->query.= “vDiscountCode,fDiscount,iGiftcert_FK,fGiftcertTotal,fMemberPoints,”;
$this->obDb->query.= “fTaxRate,fTaxPrice,tComments,vStatus,iPayStatus,fTotalPrice,iEarnedPoints,iCustomerid_FK”;
$this->obDb->query .= ” FROM “.ORDERS.” WHERE iOrderid_PK=’”.$this->request['mode'].”‘”;

$qryResult = $this->obDb->fetchQuery();
$rCount=$this->obDb->record_count;
if($rCount!=1)
{
$errrorUrl=SITE_URL.”index.php?action=error&mode=order”;
$this->libFunc->m_mosRedirect($this->libFunc->m_safeUrl($errrorUrl));
}

#PARSING VALUE TO TEMPLATE VARIABLE
$this->ObTpl->set_var(“TPL_VAR_ORDER_ID”,$this->libFunc->m_displayContent($qryResult[0]->iInvoice));
$this->ObTpl->set_var(“TP_VAR_STORE_NAME”,SITE_NAME);
$this->ObTpl->set_var(“TPL_VAR_TOTAL”,$qryResult[0]->fTotalPrice);
$this->ObTpl->set_var(“TPL_VAR_TAX_TOTAL”,0);
$this->ObTpl->set_var(“TPL_VAR_SHIPPING_COST”,$qryResult[0]->fShipTotal);
$this->ObTpl->set_var(“TPL_VAR_CITY”,$this->libFunc->m_displayContent($qryResult[0]->vCity));
$this->ObTpl->set_var(“TPL_VAR_COUNTY”,$this->libFunc->m_displayContent($qryResult[0]->vZip));
$this->ObTpl->set_var(“TPL_VAR_COUNTRY”,$this->libFunc->m_displayContent($qryResult[0]->vFirstName));

#GETTING PRODUCTS DETAIL AND ADD TO GOOGLE API
$this->obDb->query = “SELECT iOrderProductid_PK,iProductid_FK,iQty,OP.fPrice,”;
$this->obDb->query.= “fDiscount,OP.vTitle,OP.vSku,OP.iKit,OP.tShortDescription,OP.vSeoTitle, “;
$this->obDb->query.=”OP.iTaxable,OP.iFreeship,vPostageNotes,vDownloadablefile “;
$this->obDb->query .= ” FROM “.ORDERPRODUCTS.” OP INNER JOIN “.PRODUCTS.” P ON OP.iProductid_FK=P.iProdId_PK WHERE iOrderid_FK=’”.$this->request['mode'].”‘”;
$rsOrderProduct=$this->obDb->fetchQuery();
$rsOrderProductCount=$this->obDb->record_count;
if ($rsOrderProductCount >0){
for($i=0;$i< $rsOrderProductCount;$i++){

#PARSING VALUE TO TEMPLATE VARIABLE
$this->ObTpl->set_var(“TPL_VAR_PRODUCT_TITLE”,$this->libFunc->m_displayContent($rsOrderProduct[$i]->vTitle));
$this->ObTpl->set_var(“TPL_VAR_SKU_CODE”,$this->libFunc->m_displayContent($rsOrderProduct[$i]->vSku));
$this->ObTpl->set_var(“TPL_VAR_PRODUCT_PRICE”,number_format($rsOrderProduct[$i]->fPrice,2,’.',”));
$this->ObTpl->set_var(“TPL_VAR_QUANTITY”,$rsOrderProduct[$i]->iQty);
$this->ObTpl->set_var(“TPL_VAR_ORDER_ID”,$this->libFunc->m_displayContent($qryResult[0]->iInvoice));
$this->ObTpl->set_var(“TPL_VAR_CATEGORY”,”"); # INITILISE CATEGORY NAME

#GETTING CATEGORY NAME BASED ON PRODUCT ID
/*
PLEASE NOTE: A PRODUCT COULD BE ASSOCIATED TO MANY DEPARTMENTS OR HOMEPAGE THEREFORE WE WILL GET
THE CATEGORY WHICH THAT PRODUCT WAS INITIALLY CREATED FROM.
*/

$this->obDb->query  = ” SELECT fusionId, iOwner_FK, iOwner_FK, vtype, iState, vOwnerType “;
$this->obDb->query .= ” FROM ” .FUSIONS . ” WHERE iSubId_FK = ‘”.$rsOrderProduct[$i]->iProductid_FK .”‘”;
$this->obDb->query .= ” AND vOwnerType =’department’ AND iState =’1′ AND iOwner_FK >0 ORDER BY fusionId”;

$rsFusion=$this->obDb->fetchQuery();

if ($this->obDb->record_count > 0){
#ASSIGN THE FIRST RECORD TO CATEGORY ID
$deptId = $rsFusion[0]->iOwner_FK;

$this->obDb->query  = ” SELECT iDeptid_PK, vTitle FROM “. DEPARTMENTS . ” WHERE iDeptid_PK = ‘”. $deptId .”‘”;
$rsDept    =$this->obDb->fetchQuery();

$this->ObTpl->set_var(“TPL_VAR_CATEGORY”,$this->libFunc->m_displayContent($rsDept[0]->vTitle));
}#if

#PARSE PRODUCTS DETAIL TO GOOGLE E-COMMERCE API
$this->ObTpl->parse(“item_blk”,”TPL_GOOGLE_ADDITEM_BLK”,true);
}#for loop
}#if $rsOrderProductCount

$this->ObTpl->parse(“google_blk”,”TPL_GOOGLE_ECOMMERCE_TRACKING_BLOCK”);
$this->ObTpl->parse(“orderstatus_blk”,”TPL_ORDERSTATUS_BLK”);
}
$backOrderUrl=$this->libFunc->m_safeUrl(SITE_URL.”ecom/index.php?action=checkout.backorder”);
$this->ObTpl->set_var(“TPL_VAR_BACKORDERURL”,$backOrderUrl);

</pre>

Notice

1. If your shop is using Off-site payment gateway such as Paypal or GoogleCheckout, it is required your customer going back to the merchant site otherwise no record is tracked.

2. The modified m_orderProcessed() method is also availablet to download from the link at bottom of the post.

Enjoy!

Download google ecommerce tracking code for tradingeye and uk2 Version 1

Categories: E-commerce, Games, PHP, Tradingeye & UK2 Ecommerce, Viva, Web development | Tags: , , , , , , | 17 Comments

Prestashop: just an other open source e-commerce system

November 12th, 2008

Has anyone heard of an open source e-commerce system “Prestashop“? I bumped into it from business forum and it really inspired me. It does support multiple languages, multiple currencies and very friendly backend system. I’m now planning to use it for my future e-commerce projects.

Why don’t you check it out yourself and who know you might benefit from it.

Don’t forget to checkout their forum where thousand of developers all round the world developed some amazing plugins and modules such as: Protx payment gateway, Google Checkout etc

prestashop front endprestashop backend

Back-office
comprised of your administrator panel
  • Unlimited categories & subcategories
  • Full-featured WYSIWYG text editor
  • Unlimited product attribute combinations
  • Unlimited product specs
  • Unlimited images with automatic resizing & file optimization
  • Unlimited currencies
  • Unlimited tax settings
  • Unlimited carriers & destinations
  • Tax by state, country, both, zones, or no taxes
  • Digressive pricing (Quantity discounts)
  • Real-time currency exchange rates
  • Inventory management
  • SMS/Text-message alerts
  • Add/delete function modules
  • Bar codes
  • Contextual help
  • Attribute Combo Generator
  • Delivery status notification e-mails (customizable)
  • Unlimited languages & dialects
  • Import/export language translations
  • 13 default language translations
  • Search Engine Optimization (SEO)
  • Friendly URLs / Permalinks
  • 100% modifiable graphic themes
  • Back Office users & permissions (ACL )
  • Maintenance Mode
  • Minimum order amount
  • Newsletter contact export
  • Alias search
  • Bulk lister/import .CSV files
  • SSL (Secure Sockets Layer) encryption
Front-office
comprised of your business Website
  • Special deals (price reductions, gift vouchers)
  • Featured products on homepage
  • Top sellers on homepage
  • New items on homepage
  • ‘Free shipping’ offers
  • Cross-selling (Accessories)
  • Product image zoom
  • Order out-of-stock items
  • Customer subscription & user accounts
  • Unlimited payment methods
  • Payment by bank wire
  • Cash-On-Delivery (COD)
  • Preconfigured for Paypal™
  • Multiple-recipient contact form
  • Product tagging & tag cloud
  • Search
  • Merchandise return (RMAs) & credit slips
  • Package tracking
  • Offer gift-wrapping & recycled packaging
  • PDF customer invoice
  • Shopping Cart recall
  • Sale of services & virtual goods
  • Custom Favicon
  • RSS feed
  • Newsletter opt-in
  • ‘Pick up in-store’ option

Categories: E-commerce, Web development | Tags: , , , , | 1 Comment

Mary Chocolatier is about to launch their new e-commerce site

November 2nd, 2008

Mary Chocolate -Belgian chocolates, which represents the finest expression of the Chocolatier’s.

mary-chocolatier-chocolate-site

mary-chocolatier-chocolate-site

marychocolate.co.uk is designed and developed by KD Web (Studio Design in London)

Customisation listing:

1. Chocolate by category (Homepage)
2. Chocolate pop-up gallery (Department)
3. Merge “Postage Method” into Billing & Shipping page
4. Add to basket button for each product on Department page

Categories: E-commerce, Viva | Tags: , , | No Comments