Authenticate email, anti-spam

1) SPF

2) DKIM

 

3) DMARC

host: *.impzh.com._report._dmarc

value: v=DMARC1

Learn More

How to use feeds module

  • update exiting nodes.. skip hash tag and force update
  • set up unique value so you don't get duplicate items
  • use feeds tamper to import taxonomy term (auto crreate),  two plugins (strip tags, explode), empty items, create emtpy term
  • how to import images
  • how to import field collection items

 

 

 

Learn More

Drupal Commerce: Getting the price of a product programatically

$product = commerce_product_load(10);

If you have a commerce product - you can get its price information using entity api's excellent wrapper.

$price = entity_metadata_wrapper('commerce_product', $product)->commerce_price->value();

$price is an array containing the amount (in minor units e.g. 7600 for £76) and currency_code (e.g. 'GBP')

An even better function is this which will also take account of product pricing rules that might be in place:

$price = commerce_product_calculate_sell_price($product);

Learn More

remove all the .svn

run following command first

find . -name .svn -exec ls {} \;

 

then run the following command to delete all .svn files

find . -name .svn -exec rm -rf {} \;

 

remove a file from svn control

$ svn rm --keep-local my_important_file

Learn More

SVN Permission denied Error

The problem

It happens to me and my team member every so often.  We accidentally run an SVN update using root.  This will mess up with the permission of course.  And you will get an error like below.
svn: Can't open file 'PATH/TO/YOUR/FILES/.svn/lock': Permission denied

 

The solution

Run the following command using root

cd /PATH/TO/MY/PROJECT
sudo find . -exec chown apache:development {} \;
sudo find . -exec chmod 2770 {} \;

Run the following command using www

svn cleanup

Learn More