WordPress is more and more stable and to customise the login page can be frustrating. When you install an worpress cms and begin to use it there is not a big issue that your website tells everybody:”Hey I am done …
Category Archives: PHP
Category ID – WordPress
WordPress is jumping as usual from one version to another and many rock functions become deprecated. As WordPress developer you may need current functions. Get current categoryID if you know the post ID. That’s simple and common and there is …
Additional images – tabbed module – bug
Additional images are not shown – ZenCart Tabbed Products Lite module Cause – file is not found Check if the file exists in your folder – file names array is not built. if you upload files with CAPITAL extensions like …
WordPress 3.11.x – problems
There are no custom fields supported into administrative area. You can still use any custom field like before but you must manipulate name and values directinto database There are no history for posts /ages supported but you can extract any …
SSU module and .htaccess
All looks good and it works as long as your ZenCart is imstalled in the root. Problems appear when you have ZenCart installed in /shop folder for example. To understand better I will take and example: website: olalawebsite.com/shop absolute path …
Categories listing – Zencart
Basic files:used to display categories listing (caegories which have subcategories) /includes/YOUR_TEMPLATE/templates/tpl_index_categories.php Here is displayed categ image and description if exist and are enabled to be displayed. On #35you have: require($template->get_template_dir(‘tpl_modules_category_row.php’,DIR_WS_TEMPLATE, $current_page_base,’templates’). ‘/tpl_modules_category_row.php’); /includes/YOUR_TEMPLATE/templates/tpl_modules_category_row.php From now on is simple, there will …
Pages and IDs – WordPress
1) Get Current page/post ID: get_the_ID() is handy for templates in conjunction with the get_page and get_post functions. Using $post, the ordpress post global object global $post; if($post->post_type == ‘page’){ echo ‘ This is a page. ID= ‘.$post->ID; } elseif($post->post_type …
Database – Zen Cart
Most of what you need is located into query_factory.php 1. standard way to browse extracted records ( no pagination): $sql= “YOUR SQL STATEMENT” $result_list = $db->Execute($sql) while (!$result_list->EOF) { …………….. YOUR PHP / HTML CODE …………….. $result_list->MoveNext(); } Eventually set …
Create a module – ZenCart
1) /includes/languages/english/my_module_name.php must have at least two lines define(‘NAVBAR_TITLE_1′, ‘Module Name’); define(‘HEADING_TITLE’, ‘Module Name more details’); 2) /includes/modules/pages/my_module_name Folder which must contain at least this file: /includes/modules/pages/my_module_name/header.php // This should be first line of the script: $zco_notifier->notify(‘NOTIFY_HEADER_START_MY_MODULE_NAME‘); require(DIR_WS_MODULES . zen_get_module_directory(‘require_languages.php’)); …
Login, Register in Zencart
There is no init heandler for login / register The file where the user session is created / recreated is : /includes/module/pages/login/header_php.php action = process, around #84 there are interesting lines: $_SESSION['customer_id'] = $check_customer->fields['customers_id']; $_SESSION['customer_default_address_id'] = $check_customer->fields['customers_default_address_id']; $_SESSION['customers_authorization'] = $check_customer->fields['customers_authorization']; …
Create box – ZenCart
To create a side box (left or right) for Zen Cart please follow instructions bellow. If you do not know what to write into new created files just open existing files already done. Look for them in the same folders …
Add field in products – ZenCart
Admin area: 1) Add new content which allow you to add/change data in the new fieed admin/includes/modules/product/collect_info.php Add a line, just copy and change all between <tr> …</tr> Consider <tr> …</tr> space as well. 2) Create a function which extract …
Define pages part 2, database and admin – ZenCart
Data about Zencart are stored in two tables : YOURPRFIX_configuration_grp YOURPRFIX_configuration For Define page the ID from YOURPRFIX_configuration_grp table is 25 Into admin area the page used to change/save parameters into configuration tables from database is /admin/configuration.php In 1.3.8a it …
Checkout flow – Order -ZenCart
The most “interesting” part is the step 2 of 3 – Payment Information because here is computed the order value including any discount, here the user can redeem his code and here the user will choose the payment option. We …
Currency and FrendlyURL and product info – ZenCart
Currency selector from ZenCart is perfect as long as you are not using any pretty/frendly URL adon. It may work but sometimes it may not baecause currency selector use GET method. To avoid further headache the beset is to capture …
Session issue and php
We can manipulate sessions via .htaccess (or php.ini) There is another article about how to manage php.ini directives via .htaccess. Anything is in php.ini can be c hanged via php. Here it is a simple way you can change session …
Shipping Module – ZenCart
A) Components To create a shipping module two main files are compolsory: /includes/languages/english/modules/shipping/YOUR_SHIPPING_MODULE.php Usually it contains two lines: title and description For example: define(‘MODULE_SHIPPING_YOUR_SHIPPING_MODULE_TEXT_TITLE’ , ‘YOUR_SHIPPING_MODULE‘); define(‘MODULE_SHIPPING_YOUR_SHIPPING_MODULE_TEXT_DESCRIPTION’ , ‘YOUR_SHIPPING_MODULE‘) ; /includes/modules/shipping/YOUR_SHIPPING_MODULE.php It contains a “class” which will be initialised into …
Add to Cart flow – ZenCart
Table used: TABLE_CUSTOMERS_BASKET – customers_basket Structure: customers_basket_id int(11) No None auto_increment customers_id int(11) No 0 products_id tinytext latin1_swedish_ci No None customers_basket_quantity float No 0 final_price decimal(15,4) No 0.0000 customers_basket_date_added varchar(8) TABLE_CUSTOMERS_BASKET_ATTRIBUTES – customers_basket_attributes Structure: customers_basket_attributes_id int(11) No None auto_increment customers_id …
Plugins and Modules – CMS Made Simple
- Create your module (MyModule). It must be installed using module manager. – Just copy plugins/function.news.php to plugins/function.mymodule.php (do not use exactly the same name, to use small letters wil be ok – Change name of those 3 funtions according …
Write/build an Add On – ZenCart
The most complex scenario : zen cart module / add on must have two parts: front end user and admin area 1. Admin area a) To have a new main menu on horizontal bar: – edit and change based on …
eCommerce – CMS Made Simple
Order, Product, Cart, Payment Gateway – CMS MAde Simple Notes for developers PRODUCT module – Category list cannot be sorted. (At this point ) There are 3 tables used: product (all data about products) , category (name, id) and categ-prod …
Basic Customisation – CMS Made Simple
All is stored into database: pages, templates and stylesheets (.css) files. 1. Pages If during instalation you allowed database to be populated delete all files execept Home. 1. Template Copy basic template you wish to use in a new one …
Add module in Admin – ZenCart
Let’s suppose your Zen Cart module is named MyZenModule To add a module in admin area in order to beable to manage your module from the backend of a zen cart website you need to: 1. Add a page: /admin/mymodule.php …
Whois database
Find bellow list of the most of the top servers which control domain names all over the world (based on extensions) Developers usage only. Ext Server String Trans. Year(s) com.au net.au org.au asn.au id.au whois-check.ausregistry.net.au Available Yes 2 com whois.crsnic.net …
PHP and .htaccess in commercial environment
Website in comercial environment: 1) .htaccess and php directives General rule is: php_attr_name PHP-variable value a) Temporary enable error display php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on php_value error_reporting 1 b) Diable error display using .htaccess php_flag display_startup_errors …




(8 votes, average: 4.88 out of 5, rated)