Ali Qureshi, is a web developer based in Lahore, Pakistan. Since 2001, Ali has developed creative, interactive, usable & successful web apps, Facebook apps, web portals and have authored WordPress plugins & themes. Ali has worked as a Software Architect, SEO Consultant, project manager, PHP & Flash AS3 developer, and sometimes as designer. He has also reviewed three books for Packt Publishing on jQuery and Mobile development. He is currently developing WordPress themes & Plugins and mobile apps APIs. When not working, he spends his time exploring and trekking.

[osCommerce] Change Currency Selection based on Payment Module on checkout_confirmation page in osCommerce Store

In osCommerce store which has been set up to accept payment using multiple payment modules, there are chances that you might want to accept payments in specific currencies based on payment methods. Not every payment method support all currencies. You can change currency based on payment module selection by adding few lines of code on…

[osCommerce] How To Check if the Customer is Logged in or not in osCommerce Store

While working in osCommerce store, there are many places where you want to show some infromation only to logged in customers, and some thing else to non-logged in users. For this purpose, you need to check tep_session_is_registered(‘customer_id’) variable and show different blocks of content. In the following code, I have put togther an example where…

[AlertPay+osCommerce] Resolve AlertPay Payment Module Error – ap_shipping charges field must be numeric

While setting up AlertPay Payment module in a osCommerce Store, I encountered following error “ap_shippingcharges field must be numeric” during a test purchase. To fix this error, open catalog/includes/modules/payment/alertpay.php Find this: 78 79   tep_draw_hidden_field(’ap_shippingcharges’, $order->info[’shipping_cost’]) . Replace with this: 78 79   tep_draw_hidden_field(’ap_shippingcharges’, number_format($order->info[’shipping_cost’], 2, ‘.’, ”)) . I have also updated the AlertPay…

[AS3] Load External swf into MovieClip & Play/Pause/Forward/Rewind and Stop it at LastFrame from Main Flash Movie

Loading external swf into a MovieClip inside your main Flash movie is a routine job and ActionScript3 allows you to do that quite efficiently. What AS3 does not provide you are the built-in functions to control loaded swf file timeline from your main movie. I initially tried to find some built-in functions to control the…

[AS3] Start/Seek a FLV Video at a Specific Time using Cue Points in Flash ActionScript3

While loading FLV videos using FLVPlayback Componenet 2.5 in Flash, when I tried to navigate to the “cue” point I had created using AS3 cue point object,   flvPlayer.seekToNavCuePoint("cp1"); It failed with following error:   VideoError: 1003: Invalid seek at fl.video::FLVPlayback/seekToNavCuePoint() at Function/<anonymous>() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at fl.video::FLVPlayback/http://www.adobe.com/2007/flash/flvplayback/internal::handleVideoEvent() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::setState()…

[AS3] Loading External swf & going to Specific Frame using Loader Class in ActionScript3

Using AS3 in Flash, If you want to load an external swf movie and make it go to a specific frame to play or stop, you can achieve that using AS3 Loader class with the following code:   function loadSWF(swfURL){ var myLoader:Loader = new Loader(); var mySWF:URLRequest = new URLRequest(swfURL); myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); myLoader.load(mySWF);…

[Joomla] Resolve Error Installing Joomla Components or Plugins, It was not possible to copy the selected file

If you get following error while installing Joomla components or plugins,   It was not possible to copy the selected file. JInstaller::install: Failed to copy file: /var/www/localhost/htdocs/tmp/install_4d621e648af3f/plg_sslredirect/sslredirect.php to /var/www/localhost/htdocs/plugins/system/sslredirect.php Permission Solution You can resolve this by changing permissions (chmod to 777) on following directories in your Joomla website.   chmod 777 /tmp chmod 777 /plugins/content…