Marksserver - code.marksserver.co.uk
General Information:
Latest News:
Magento – Add quantity box to product list page 21 Nov 2012 | 02:02 pm
getOptions()): ?>enctype="multipart/form-data" > isGrouped()): ?> __('Qty') ?>:
CSS – Hide an element but keep its width height and position 15 Nov 2012 | 06:44 pm
.myelement { display:inline-block;visibility: hidden; }
CSS Target Firefox only 14 Nov 2012 | 05:23 pm
@-moz-document url-prefix() { .products-grid . { margin-left:28px !important;} .products-grid .item { margin-left:44px;z-index:9; margin-top:129px;} }
Simple XML example 14 Nov 2012 | 02:32 pm
1 $xml = simplexml_load_file('./app/etc/local.xml', NULL, LIBXML_NOCDATA); $db['host'] = $xml->global->resources->default_setup->connection->host; $db['name'] = $xml->global->resources->default_setup-...
Magento – Create CMS Page Programmatically 31 Oct 2012 | 06:37 pm
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $cmsPage = array( 'title' => 'My CMS page', 'identifier' => 'my-cms-page', 'content' => 'CONTENT HERE', 'is_active' => 1, 'sort_order...
Magento – Create Static Block Programmatically 31 Oct 2012 | 04:08 pm
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $staticBlock = array( 'title' => 'My Static Block', 'identifier' => 'my-static-block', 'content' => 'Lorem ipsum', 'is_active' => 1, ...
MySQL – Count number of active connections to DB 26 Oct 2012 | 06:51 pm
select host,count(host) from information_schema.processlist group by host;
Notepad++ Remove last character of a line (if it exists) 26 Oct 2012 | 01:45 pm
Remove last character of a line (if it exists) Example – Remove a comma from the end of the line if there is one:
Notepad++ Remove last character of a line (if it exists) 26 Oct 2012 | 01:45 pm
Remove last character of a line (if it exists) Example – Remove a comma from the end of the line if there is one: Find/Replace Search Mode: "Extended (\n, \r, \t etc)" Find What: ,\r\n Replace with: \...
Siege 24 Oct 2012 | 08:39 pm
wget http://www.joedog.org/pub/siege/siege-latest.tar.gz tar xvzf siege-latest.tar.gz cd siege-2.71/ # if you're on a fresh ubuntu, get this package first sudo apt-get install build-essential ./config...