DecryptWeb Blog

Opensource Web Solutions

Variables

Custom Email Templates in Magento

Hello, I am explaining here the method for sending custom emails using the custom email templates with variables. 1) Create an email template from Admin-end > System > Transactional Emails, for example lets put this as Template Content 2) Suppose the id of the template created is 3 3) Below code you can write in […]

Reading XML

I am listing here method for reading XML file or XML string with the help of PHP. The output on executing above code will be: I am listing here another example: The output on executing above code will be: For further reference click here

Get Product ID and Product Name in Magento

In Magento eCommerce while working with catalog model, There arise the need to fetch product details from product id. We can get all product details if we have product id. But sometimes we only have product name, so we need to get product id for getting product details. I am listing here both the method. […]

Extracting String

This is small but very useful script. I have shown example for extracting only ‘src’ value from the ‘img’ tag, but you can modify and use as per your requirement using ‘preg_match_all’ function. Output will be ‘http://www.somesite.com/abc.jpg’

Scroll to top