<?php | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return array |
<?php | |
/** | |
* Create Shopping Cart Sales Rule with Specific Coupon Code Programmatically | |
*/ | |
// All customer group ids | |
$customerGroupIds = Mage::getModel('customer/group')->getCollection()->getAllIds(); | |
// SalesRule Rule model | |
$rule = Mage::getModel('salesrule/rule'); |
<?php | |
/** | |
* Product Attribute Installer | |
*/ | |
try { | |
/* @var $installer Mage_Catalog_Model_Resource_Setup */ | |
$installer = $this; | |
$installer->startSetup(); |
Typing vagrant
from the command line will display a list of all available commands.
Be sure that you are in the same directory as the Vagrantfile when running these commands!
vagrant init
-- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.vagrant init <boxpath>
-- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example,vagrant init ubuntu/trusty64
.
vagrant up
-- starts vagrant environment (also provisions only on the FIRST vagrant up)
Sometimes you have the problem that a Magento cart price rule does not work when you enter a coupon code, although you think it should. | |
There are certain areas where it could fail and I will illustrate the two most important ones. | |
First check for the file Mage_SalesRule_Model_Validator and its protected function _canProcessRule($rule, $address). | |
The rule fails inside that function and this can be for many reasons which I would divide into two main categories: | |
a) General limitations such as a usage limit (code can only be used 5 times), customer limit (can only be used once per customer) | |
b) If the general limitations do not apply, the rule will fail at if (!$rule->validate($address)) so at its validate() method. | |
To debug this, I found that it is most useful to go to the file Mage_Rule_Model_Condition_Combine and in the function validate() enter the following code: |
<?php | |
/* @var $installer Mage_Core_Model_Resource_Setup */ | |
$installer = $this; | |
$installer->startSetup(); | |
$connection = $installer->getConnection(); | |
$identifier = 'id-goes-here'; | |
$title = 'Title Goes Here'; |
To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn
plus some key.
Important: In the instructions below, "Press X+Y+Z
" means press and hold key X
, press and hold key Y
, press and hold key Z
in that order, and then release all three.
As an example, to bind Fn+PgUp
to the play/pause media function:
Gitflow is a Git workflow design that was first published and made popular by Vincent Driessen at nvie. The Gitflow defines a strict branching model designed around the project release. This provides a robust framework for managing larger projects.
Gitflow is ideally suited for projects that have a scheduled release cycle. This workflow doesn’t add any new concepts or commands beyond what’s required for the Feature Branch Workflow. Instead, it assigns very specific roles to different branches and defines how and when they should interact. In addition to feature branches, it uses individual branches for preparing, maintaining, and recording releases. Of course, you also get to leverage all the benefits of the Feature Branch Workflow: pu