Posts

Showing posts with the label Joomla

[Joomla] Check If user logged in

Just realize there this $my variable that conveniently lets you access the user id of a (logged in) user on the site. if ($my->id) { // Do something here } Not something fantastic. I just realize this. :p

Acajoom Installation Error Fix

Image
Was upgrading Acajoom GPL 3.2.7  to Acajoom 5.2.0  and encountered the following errors. JInstaller::install: SQL Error. DB function failed with error number 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 35 SQL=CREATE TABLE IF NOT EXISTS `z1ck_acajoom_lists` ( `id` int(10) NOT NULL auto_increment, `list_name` varchar(101) NOT NULL default '', `list_desc` text NOT NULL, `list_type` tinyint(2) NOT NULL default '0', `sendername` varchar(64) NOT NULL default '', `senderemail` varchar(64) NOT NULL default '', `bounceadres` varchar(64) NOT NULL default '', `layout` text NOT NULL, `template` int(9) NOT NULL default '0', `subscribemessage` text NOT NULL, `unsubscribemessage` text NOT NULL, `unsubscribesend` tinyint(1) NOT NULL default '1', `auto_add` tinyint(1) NOT NULL default '0', `user_choose` tinyin...

Mobile Redirection Script

This is the code for Mobile Detection and redirection. For Joomla , add this in the [joomla-folder]/emplates/[your-theme]/index.php , <head> section. Remember to change the mobile redirection site, the example used here is " http://m.your-site.com/ " <script type="text/javascript"> if((navigator.userAgent.match(/ipad/i))             || (navigator.userAgent.match(/ipod/i)||navigator.userAgent.match(/iphone/i))             || (navigator.userAgent.match(/android/i))             || (navigator.userAgent.match(/opera mini/i))             || (navigator.userAgent.match(/blackberry/i))             || (navigator.userAgent.match(/(pre\/|palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine)/i))             || (navigator.userAgent.match(/(iris|3g_t|windows ce|opera mobi|...

[Virtuemart] Customize Order List - adding extra column

In this post, I am going explain on how to add an extra column in Virtuemart Administrator Order List page. (Note that, in this example, I'm going to add a new address_1 column). Note: Please refer to my previous post on " adding search keywords " for the SQL query code for the other fields that you want. Getting Started. In /administrator/components/com_virtuemart/html/order.order_list.php locate this section, around line 27. Then add " address_1 " into the line, as below. //$list .= "first_name, last_name FROM #__{vm}_orders, #__{vm}_order_user_info WHERE "; // This is the modified line. $list .= "first_name, last_name, address_1 FROM #__{vm}_orders, #__{vm}_order_user_info WHERE "; After that, locate this section, as usual and note that " Address_1 " is already the added column. $columns = Array( "#" => "width=\"20\"", "<input type=\"checkbox\" name=\"tog...

Virtuemart Add-to-cart not working

Image
Check whether you are using '  (direct input from keyboard) instead of ’  for your product name. For example: Virtuemart potential source of problem :) References : http://forum.virtuemart.net/index.php?action=printpage;topic=26822.0

[Virtuemart] Customize Order List search keywords

Image
The default Order List search keyword doesn't check for customer's email address, billing addresses, phone numbers, Custom Message... To include all these: In /administrator/components/com_virtuemart/html/order.order_list.php locate this section if (!empty($keyword)) { $q .= "(#__{vm}_orders.order_id LIKE '%$keyword%' "; $q .= "OR #__{vm}_orders.order_status LIKE '%$keyword%' "; $q .= "OR first_name LIKE '%$keyword%' "; $q .= "OR last_name LIKE '%$keyword%' "; $q .= "OR CONCAT(`first_name`, ' ', `last_name`) LIKE '%$keyword%' "; The add the keywords that you wish to include. Below is an example code. The codes are pretty self-explanatory. $list = "SELECT #__{vm}_orders.order_id,order_status, #__{vm}_orders.cdate,#__{vm}_orders.mdate,order_total,order_currency,#__{vm}_orders.user_id,"; $list .= "first_name, last_name...

Joomla - Default login/logout page

Image
If you accidentally removed the component in your page. You can manually access the page via http://<your-site.com>/index.php?option=com_user&view=login As for the Logout link, http://<your-site.com>/index.php?option=com_user&task=logout I find that this is particularly useful when maintaining the site for client who does not want user registration functionality. Customising Login links to User-friendly link For those who are new to Joomla here are the steps to create a user-friendly link (or alias) for the login page. For example, user will be able to login via, http://<your-webpage>/login . Its pretty straight-forward, so I've screenshot the steps below. Customising the layout of the login page If you are looking for the layout of the login form, you can FTP to /components/com_user/views/login/tmpl/ folder to edit the files.

Joomla - Creating custom Login Page

Image
There is an easy way to create a customized Login Page in Joomla. 1. Adding A Custom Module Position in Joomla 1.5 First, in Jooma administrator page, navigate to Extensions>Plugin Manager> and make sure " Content - Load Module " is enabled/active. If there is a red "x" beside the plugin, click it to change the status to active. The plugin you just activated will allow you to use a syntax such as " {loadposition left} " in your content item(s) in order to render modules. So now, lets say we want to create a custom module position , lets say "c_login_page". To create a module position  named "splash_page", you will need to open the file   /templates/your_current_template/templateDetails.xml . You should see an array of predefined positions such as: <position>left</position> <position>right</position> <position>top</position> /* Add this */ <position>c_login_page</position> ...

Joomla Virtuemart related customization

After setting up Virtuemart in Jooma, naturally the the search module in Joomla to return the results of the products available. But, the default search in Joomla will return all the pages in Joomla, instead of the list of products. To solve this, we can install search extensions (modules). There are a lot of free search modules out there, but I'm only going to introduce this particular AJAX search module called "VM Live Product Search". This module will return search results in a floating box for user to select from. [Module] VM Live Product Search Download: http://extensions.virtuemart.net/index.php?option=com_sobi2&sobi2Task=sobi2Details&catid=9&sobi2Id=92&Itemid=2# To edit the CSS, go to /public_html/shop/templates/default/css , and  /public_html/shop/modules/mod_vm_live_product/css . To Disable Auto Redirect (I'm still working on it... hehe ) "Recently Viewed Products" section To remove "Recently Viewed Products...

Virtuemart - Disable SKU

Been working on Joomla and VirtueMart lately :) On of the "customization" that people (client) always want is to disable or remove the SKU number from cart , or basket , or order details  page. Did a Google search a found out that there are quite a number of people out there offering solutions to remove SKU, but at a high price. Actually, you can hide the print of the SKU in the basket and order details  page. To disable SKU in "basket" , find the file at components/com_virtuemart/themes/default/templates/basket/basket_b2c.html.php Note: If you are using other customized theme, go to ../theme/<your-theme>/ instead. Inside that file around like 23 you will find the header of the column print _('PHPSHOP_CART_SKU') ?> You can comment that or delete Usually, to be safe, I'll just comment it ( /* .......*/ ). Then for the SKU code, around line 31, do the same thing, remove or comment it. To disable SKU in "account order details...