Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 62 63 64 65 66 ... 152
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 267 posted 11 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 490 posted 11 years ago by bwangila
1 323 posted 11 years ago by krillzip
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 338 posted 11 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 282 posted 11 years ago by TheJasonParker
Create a CSV with a maximum of 1 column, with just the Magento category ID.
0 259 posted 11 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 380 posted 11 years ago by TheJasonParker
Overlook sending of emails in Mage_Sales_Model_Order->sendNewOrderEmail(), remove sending to customer from there. (around line 872)
0 315 posted 11 years ago by nico65
Function to simply generate a random password.
0 406 posted 11 years ago by nsbucky
1 369 posted 11 years ago by metoikos
Skeleton for the main panel in a CMSMS module. defaultadmin.php
1 316 posted 11 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 348 posted 11 years ago by blueocto
You can create a page template that you can apply to pages so only logged in members can view the contents:
0 489 posted 11 years ago by howardpanton
WordPress shortcode: Display content to registered users only
1 391 posted 11 years ago by howardpanton
2 336 posted 11 years ago by sjacunningham
I use the following code to prevent a user from getting a "webpage expired" message when hitting the back button on a page where the search results are also on the page with the form.
0 376 posted 11 years ago by bradless
Skeleton for the main panel in a CMSMS module. defaultadmin.php, with CGExtensions
1 313 posted 11 years ago by krillzip
This takes a date like so: Sat, 08 Jan 2011 from a database and allows you to use it in your code. For example if you wanted to work out a week from Sat, 08 Jan 2011 it can be done with ease. I created this for a project i am currently working on. Th...
0 314 posted 11 years ago by JonnySnip3r
Feel free to use this class however you'd like
0 420 posted 11 years ago by jschilling
Modify includes to connect and select to provide correct result set
0 574 posted 11 years ago by kidmizere
This script generates an expiring link to an Amazon S3 file
0 330 posted 11 years ago by esundahl
0 236 posted 11 years ago by takel
0 346 posted 11 years ago by takel
0 257 posted 11 years ago by takel
4 451 posted 11 years ago by takel
0 313 posted 11 years ago by gabbo
possibilitar a leitura de cada chave específica do google maps para cada domínio respectivo à chave
0 319 posted 11 years ago by rbulgueroni
1 ... 62 63 64 65 66 ... 152