Welcome To Snipplr
Everyone's Recent Snippets Tagged c
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
When a float is contained within a container box that has a visible border or background, that float does not automatically force the container's bottom edge down as the float is made taller. Instead the float is ignored by the container and will han...
0
889
posted 14 years ago by lamebollock
First off, create your CSV with 2 columns, the parent ID for the category and the category name – you could easily add more columns for extra options, but it wasn’t necessary for us.
The CSV file should be something like this:
3,subcat
4,s...
0
829
posted 14 years ago by TheJasonParker
I needed to split a decimal number into the integer part and the fraction part and save both of them in different variables
0
1785
posted 14 years ago by bwangila
This piece of code allows to insert text into the tinymce textarea when writing a WordPress plugin for instance.
0
831
posted 14 years ago by tomidle
Zugangsdaten
In der wp-config.php lassen sich bestimmte Konstanten definieren, sodass die Abfrage der Zugangsdaten und somit auch die Speicherung nicht mehr nötig ist. Sie lauten wie folgt:
define('FTP_HOST', 'ftp.example.org');
define('FTP_USE...
0
906
posted 14 years ago by gabbo
Simply save the above code in a PHP file in the base Magento directory of your store, and visit the URL in your web browser, simples!
0
849
posted 14 years ago by TheJasonParker
Create a CSV with a maximum of 1 column, with just the Magento category ID.
0
818
posted 14 years ago by TheJasonParker
The easiest way to pull this off is by means of a quick script. The key to this script is that the indexing functionality is disabled entirely for the process, then enabled again at the end – requiring a manual update at the end.
In our case, we...
0
1048
posted 14 years ago by TheJasonParker
Overlook sending of emails in Mage_Sales_Model_Order->sendNewOrderEmail(), remove sending to customer from there.
(around line 872)
0
858
posted 14 years ago by nico65
After the MySQL above has run – you’ll need to let Magento take the reigns back a little to update the category indexes, this is quite straightforward, but a little time consuming.
Login to your admin and go to System > Cache Management, the s...
0
875
posted 14 years ago by TheJasonParker
You'll first need to find the attribute_id value for 'status' for your Magento installation and replace 273 in this example.
The easiest way to tell is if you go into:
Admin > Catalog > Attributes > Manage Attributes
Then in the “Attribute...
0
1253
posted 14 years ago by TheJasonParker
Just add a method like this in a Class that needs to call methods dynamically, without a prior knowledge of whether they exist or not.
0
1033
posted 14 years ago by jayarjo
Skeleton for the main panel in a CMSMS module. defaultadmin.php
1
930
posted 14 years ago by krillzip
Put your images in a folder called 'random' in your ROOT directory.
Please this script at the top of your page:
1
962
posted 14 years ago by blueocto
PHP
You can create a page template that you can apply to pages so only logged in members can view the contents:
You can create a page template that you can apply to pages so only logged in members can view the contents:
0
1344
posted 14 years ago by howardpanton
WordPress shortcode: Display content to registered users only
1
1005
posted 14 years ago by howardpanton