Submitted by
guvnor on Tue, 10/11/2011 - 20:06
That's all Folks
Well that's almost done, there is just a bit more work though - now that our users can enter their payment details we need to be able to retrieve them in our administration panel.
Displaying the order info in the admin panel
We need to hook into the invoice part of the administration panel.
Submitted by
guvnor on Tue, 10/11/2011 - 19:50
ow our payment option is available to our user's we need to create the actual page that is displayed when the payment option is clicked on.
Submitted by
guvnor on Tue, 10/11/2011 - 19:48
Displaying our module as a payment option in the checkout
Since we have a registered our module with the payment hook a function which tells the payment hook to do something. The hook payment expects a function called hookPayment by default so thats what we need to create. This is where the hook payment allows us to have our module appear (image below)
Submitted by
guvnor on Tue, 10/11/2011 - 19:44
Testing the Install
Click the "install" button next to the Offline Payments.
If successful you should see a message displayed that says "Module installed successfully"
We can also see within our prestastore database that the payment module is now listed as a module. Below is an example (using phpmyadmin) which shows that our module has been added to the list of prestashop modules - we can verify that by the fact it has been added to the prestashop modules table.
Submitted by
guvnor on Tue, 10/11/2011 - 19:39
Making the module's install routine
Building the standard install() function
Prestashop modules have an install link. This link needs to be clicked to install the module to make it actually function within the store.
NOTE! Basically, what although the module is listed in your store as an available module, you need to to click install to actually activate the module for it to be active in your store.
See below:
Submitted by
guvnor on Thu, 06/16/2011 - 16:46
Turn on Error Reporting
When you are trouble shooting a prestashop stall by default the store will supress error messages. This can be pain when you are trouble shooting a prestashop install. It is easy enough to to turn this error message suprssion of though.
Open the file
<storeroot>/config/config.inc.php
find the line which says
@ini_set('display_errors', 'off');
it is on line 29 on my default install of prestahop 1.4
and change it to
Submitted by
guvnor on Sun, 05/08/2011 - 14:13
Create the theme folder structure.
First thing we need to do is build a folder structure under your prestashop themes folder.
We need to create a top level folder which we will call whatever we wish to call our theme. In my case I am calling my theme "bluefairy" so I will call my theme top level folder "bluefairy"
Under this folder I will create the following sub folders
js, img, css, lang and cache
Submitted by
guvnor on Sun, 02/06/2011 - 12:28
Introduction
This is part 3 of the guide that is designed to assist you with building a new theme for your Prestashop cart. You can read
Part 1 and
part 2 here
Creating a preview.jpg and enabling the theme
Create a file called preview.jpg in your favorite graphics editor (gimp, photoshop etc)and save it in the root directory.
Submitted by
guvnor on Wed, 02/02/2011 - 21:48
Introduction
This is part 2 of the guide that is designed to assist you with building a new theme for your Prestashop cart. You can read part 1 here
The first file prestashop opens when it begins running (i.e someone requests it by navigating to the site)is index.php. If we look at this file index.php (shown below in Prestashop's root directory
Submitted by
guvnor on Mon, 01/31/2011 - 11:27
Introduction
Please find a useful list of prestashop smarty variables. This is very useful when creating a template / theme or a module for prestashop. This list is taken from the init.php file found in the root of prestashop installation.
The list
The left hand items listed in red such as 'base_dir' are the variables you would use in your prestashop smarty templates. The right hand side points to what they mean.
So a good example to assit you in understanding would be the variable 'cart_qties'. This variable contains the information intval($cart->nbProducts()).