Hello! Assalamualaykum!

Hello

Salams Visitors!

Lots of Exiting changes happening Watch this space……..

Been really really busy last few months since we last updated this blog – but we still blogging away and you can also Follow us via Twitter or you can Follow us on Facebook 

Its all about Apps, Apps and More Apps!

See you soon inshallah! Hopefully it wont be too long this time >o

Display Magento Products on Home Page or any CMS Pages

Salams

If you want to display Magento Products on the Home Page or any other CMS Pages from different Categories try the following

CMS > Pages > Home Page (Or any other Pages)

Add the Following Code:

 

{{block type=”catalog/product_list” name=”home.catalog.product.list” alias=”products_homepage” category_id=”5″ template=”catalog/product/list.phtml”}}

 

Don’t forget to change Category ID to whatever you want and it should then appear on the page!

This is what we done over at http://nasheedchannel.com/portal

Physical CDs was one Category

Digital Downloads was another

So we added that code twice to that page and works a treat :)

Request Sample for Magento with Yes / No Attribute

Salams All

Currently we are redoing SunnaMusk.com Website and they are using Magento ( :D ) for their catalog

They sell mainly lovely nice Attars, Fragrances and Bakhoors as well as other stuff like Bakhoor Holders etc

So…On their website they wanted to offer the option for Customers to Order Samples of Certain Fragrances which they then ship out to customer

HOWEVER these samples were not applicable for all products for example Bakhoor Holders its a physical holder and you can’t really have samples for that lol!

Anyway Used the ParadoxLabs Request Sample Plugin which works a treat (Link here btw http://www.magentocommerce.com/magento-connect/paradoxlabs-requestsample.html ) Big thanks for a lovely plugin

but this required a bit of small customisation from ourside to achieve what we wanted

 

Ok Step one

We Create attributes from Magento Backend

> Admin > catalog > Manage Attributes > Create new attribute

Attribute code: samplerequest

Scope: store view

Default Value: YES

Unique Value: NO

Catalog Input Type for Store Owner: YES / NO

Values Required: YES

Leave the rest upto you or as it is

 

Manage Label Option Tab: Request Sample link?  (Or you can put down whatever you want meaningful to you)

Then Save

Then Catalog > Attributes > Manage Attributes Set

Choose Default Set

Unassigned Attributes you find samplerequest there simply drag it across to under General or wherever you want to put it

reload your cache and you will now find that there is a new field which says “Request Sample link” and a drop down either Yes or no

Now We Browse the template file
/public_html/store/app/design/frontend/default/themexxx/template/catalog/product/view/type/

Edit default.phtml (Or whatever template file you want

Then we add this Code right at the bottom

<?php if ($_product->getAttributeText(‘samplerequest’) == “Yes”): ?>
<p class=”availability in-stock”><a href=”<?php echo Mage::getBaseUrl(); ?>requestsample/?id=<?php echo $_product->getId() ?>”>Request a Sample</a></p>
<?php endif; ?>

The Bit in Orange is the code provided by the Plugin and the one above we did ourselves

So basically what this code says is that if “samplerequest” is set to YES then run the code in orange which is basically the request sample link and if set to no then display nothing

 

hope this helps :)

Installing Magento Extensions Via SSH

Salams

If you find that whilst trying to run any sort of mage command via SSH you get   ./mage:  Permission denied

then try the following:

rm -rf var/cache var/session
chmod 550 ./mage
./mage mage-setup .
./mage config-set preferred_state stable
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force


Hopefully that should fix it!

Zip File Corrupted in Magento Downloadable Product

Salams,

Late Ramadhan Mubarak infact very late May aswell wish you all a Eid Mubarak at this stage!

Anyway heres a  problem i was scratching my head over

We tend to use Magento CMS System for our E-commerce based website and for NasheedChannel.com (Some Great Nasheeds there btw do check it out :D )

Anyway We offer the option of Digital Download for our mp3 products so people can purchase single tracks or the entire album

So we had a few issues from customers when they purchased the full album which was infact a .zip file containing all the mp3 tracks in there that after they downloaded it the file was corrupted and could not open it, this was only after being redirected the the product download link via their control panel in magento

Tried downloading it directly from the link works fine…

so it must be the way Magento is translating the URL for download (It does not give the direct URL for good reason) it comes with a different URL with a bunch of random generated characters which is good

But anyway there was a few suggestions on the internet floating around about changing .htaccess files and messing about with them …tried it all did not work

Then realised that When magento passes the URL it Compresses it again

So we already had a zip file with the mp3 that was compressed…..so when a customer purchases the the .zip file it does it again

So the best solution for this is that if you need to upload a Zip file ensure that NO COMPRESSION is set from winrar you choose “No Store” or winzip “No compression” upload it and it worked!

Yes file sizes are larger but if you cant be bothered messing around with .htaccess files etc then this is a workaround that works

HTH!

Wassalam for now!

Yup we still around but very busy….

Assalamu alykum All

Been a few months since we updated t his blog! We have had a really busy last 6 months alhumdulillah (Never remember it this being so busy in all the time) But its good atleast we have things to keep us busy with and keep us going along!

Well you may ask what you been so busy about

Well its all about Apps development! We been designing apps and more apps ! ISlamic Apps to be precise

You can see our Android Apps here

https://play.google.com/store/apps/developer?id=Safarmedia

We have also help set up a lovely Islamic Radio Station called “Islam Radio” at www.islamradio.com Created an iPhone, Android and Blackberry App! As well as its website too

Some of our recent apps has been “Salaah Muslim Prayer” For Android – this is an excellent app courtesy islamicposters.co.uk showing a nice graphical view of how to pray each of the Salah, Janazah Prayer, Salatul Tasbeeh, Witr and So forth so do check it out

We have also launched a new Prayer time App called “What times Prayer” http://itunes.apple.com/app/what-times-prayer/id534918213?mt=8 Which shows live Prayer times for Mosques in London! Pretty Cool App this was designed for the lovely brothers at Sunnahmusk.com (Do check out their lovely collection of Attars and Ouds) and our biggest and best app is the iTajweed Quran for iPad and iPhone http://itunes.apple.com/gb/app/itajweed-quran-for-iphone/id524225870?mt=8

much awaited 13 line COLOUR CODED iTajweed Quran application is available FREE [Fisabillillah) to download for the iPhone, iPod and iPad.

This application is very easy to use with simple easy to use arrows and cursors to browse and navigate throughout the whole Qur’an app. Color codes have been used throughout to distinguish all Tajweed rules. The reader can find out the definition of any Tajweed rule and clarification.

Some Features Include:

- Bookmarks are available for easy access at any given time.
- This application can be viewed both in landscape and portrait mode.
- Quick launch Tajweed rules button
- Quick launch Tajweed colour code button
- Surah Search Function

Do download it and Benefit Inshallah!

 

so yeh its just been all about apps apps and more apps!

Full info about ALL our Current apps are here

http://www.mpadc.com/web-service/

 

Oh and btw if you need an app designed let us know inshallah :-)

Hopefully we should see you before Ramadhan if not Ramadhan Mubarak :)

 

2012 Updates!

Salams

Been a really long time since we updated this blog back in November it seems! We have not completely vanished we still around alhumdulillah!

So whats been going on since then?

Quite a lot infact

We have just completed designs of 2 websites

www.deencarrier.com << They provide unique Islamic Jewellery and

www.turath.co.uk << They sell a nice collection of Islamic Books

so do check them both out inshallah!

We also developing a few apps at the moment (Yup we do App development too)

One for a Quran Color Coded Tajweed Quran and another a Prayer app Watch this space for more information

and just generally busy with things sadly :(

Also We have had to increase our domain name prices by $1 (Only one Dollar) due to pricing increase over at ICANN but we still cheap though!

Anyway bit short blog so will update soon again inshallah!

We still around don’t worry :)

Wassalam

Magento Woes!

Salams

We are currently designing a few E-commerce based websites using Magento! Installed through softaculous

Installation went fine and the software is really good although it can be a bit of a fiddle to find your way around

Anyway Aside from that we can across a few very puzzling Errors

Each time we tested it out by adding items in the checkout if you go checking out it returns with error 500!

Cpanel Log showed “client Denied access by Server” Some help that was!

So then you can take a look at the actual Magento error log itself located in your magento directory called error_log

this showed

[05-Nov-2011 14:14:42] PHP Fatal error:  Allowed memory size of 42991616 bytes exhausted (tried to allocate 7680 bytes) in /home/nasheedc/public_html/portal/app/code/core/Mage/Directory/Model/Resou$
[05-Nov-2011 14:14:47] PHP Fatal error:  Allowed memory size of 42991616 bytes exhausted (tried to allocate 491520 bytes) in /home/nasheedc/public_html/portal/lib/Zend/Date.php on line 1591

Creating a PHP INI file and sticking it in root of magento is the way to go (the file code is below whcih you can use)

However when uploading it we came across the following error message

There has been an error processing your request
Exception printing is disabled by default for security reasons

Error log record number: XXXXXXXXXXXXXXX

AND

PDO Extension not Loaded Error

NOW what you need to do is create a php.ini file and copy the following down upload it to root of magento installation

; This file is for CGI/FastCGI installations.
; Try copying it to php5.ini, if it doesn't work

; adjust memory limit

memory_limit = 64M

max_execution_time = 18000

; disable magic quotes for php request vars

magic_quotes_gpc = off

; disable automatic session start
; before autoload was initialized

flag session.auto_start = off

; enable resulting html compression

zlib.output_compression = on

; disable user agent verification to not break multiple image upload

suhosin.session.cryptua = off

; turn off compatibility with PHP4 when dealing with objects
    
zend.ze1_compatibility_mode = off

; PHP for some reason ignores this setting in system php.ini 
; and disables mcrypt if this line is missing in local php.ini

extension=mcrypt.so
extension=pdo.so
extension=pdo_mysql.so

 

The Key to this file is to add the 3 Extension code about in your PHP File and Voila! it worked Alhumdulillah!

 

 

Cpanel / WHM Access logs – Who has logged in from where

Assalamu alaykum

Today i had the unfortunate event of Witnessing one of the Reseller accounts on the Server Being Hacked into – it was a case of it being a Bad Password unfortunately.

What basically happened was this “Kiddy” This person is not worthy of being called Hacker because its not really hacking its just a bit of Kiddy Stuff trying to be Smart Aswell..but anyway

The Login using the Reseller account in WHM

Modified the Suspended Page with the usual “This page has been hacked along with the LOLZ, Dark Black Page, Animated Text and GIFs along with some awful taste of Music playing in the background” you know what i mean

Once this is modified they then went through this reseller account list and Suspended the accounts one by one!

Now when accounts are suspended they go to a custom Suspended Page which happened in this case! So when a user went to the Website they got the Suspended Page message which was infact the Page which this person created…got me for a while but i caught on in the End..so i went on the server hunt to track down what happened

First thing was to  analyse who has access to WHM / Cpanel

From SSH go to

/usr/local/cpanel/logs

The file you want to open is called

access_log

I normally do a

pico access_log via SSH

and then it will open up the log file takes a minute or so of everything single action logged via WHM / Cpanel

Quite useful for tracking down who has logged on, their IP address, their Browser and what they have run

Now Funny thing about this was on his “Modified page” he was stupid enough to leave a Pakistani Flag on there

Around the time this happened from the logs i noticed an IP address logged in using the reseller account lurking around the suspended Page and editing this then going on the “Suspend account Spree”

doing an IP lookup normally i use http://www.whois.sc this IP address resolved back to Pakistan! so that gave it away

Suffice to say that ISP has now got a blanket ban on our server

Hacking Incident i think not – but for him gloating about it being a hacking incident when it was down to bad password is laughable!

Anyway We move on and learn new things alhumdulillah all working and back to normal