Skip to content

Instantly share code, notes, and snippets.

View srinathweb's full-sized avatar

srinath madusanka srinathweb

View GitHub Profile
@srinathweb
srinathweb / Rest-Must.md
Created July 16, 2018 04:16 — forked from saisurya-kat/Rest-Must.md
Everything about REST REST REST

REST - Representational State Transfer is intended to evoke an image of how a well-designed web application behaves.

  • Facts of REST
    • REST is not a standard/protocol its an architectural style
    • REST is protocol agnostic
    • JSON is not part of REST
    • HTTP is also not part of REST
  • 6 REST Constraints
    • Client - Server Architecture : Client and server are separated and can evolve separately.
@srinathweb
srinathweb / magento2_comkmon_issues.md
Created July 16, 2018 03:53 — forked from cagartner/magento2_comkmon_issues.md
Magento2 tips and common issues

Common Magento 2 Issues and Their Solutions // Magenticians https://magenticians.com/magento-2-issues/

Magento 2 is one of the most powerful and popular ecommerce platforms. However, many people run into Magento 2 issues. Since Magento is a fully feature-loaded platform, it may come off as difficult to handle, but if you know where to look, you can find solutions to most Magento related problems.

We have listed down the most common Magento 2 issues, and to make it easier for you, we have also provided the relevant solutions to them!

Common Issues in Magento 2

These are some common issues in Magento 2:

@srinathweb
srinathweb / gist:9a38dd2cf8230ea503853bf993c4be72
Created July 16, 2018 03:52 — forked from ecogswell/gist:3352027
Magento Certification Study Links
Get Ready for Magento Certified Developer Exam. Magento Codepool
http://blog.belvg.com/magento-certification-magento-codepool.html
Get Ready for Magento Certified Developer Exam. Magento Module Structure.
http://blog.belvg.com/magento-certification-module-structure.html
Get Ready for Magento Certified Developer Exam. The Main Magento Design Areas and More…
http://blog.belvg.com/get-ready-for-magento-certified-developer-exam-the-main-magento-design-areas-and-more.html
Get Ready for Magento Certified Developer Exam. Class Naming Conventions and Their Relationship with the Autoloader
@srinathweb
srinathweb / applyCouponCodeAction.php
Created July 9, 2018 04:38 — forked from drewgillson/applyCouponCodeAction.php
Magento - apply coupon code automatically
public function indexAction() {
$coupon_code = $this->getRequest()->getParam('coupon_code');
if ($coupon_code != '') {
Mage::getSingleton("checkout/session")->setData("coupon_code",$coupon_code);
Mage::getSingleton('checkout/cart')->getQuote()->setCouponCode($coupon_code)->save();
Mage::getSingleton('core/session')->addSuccess($this->__('Coupon was automatically applied'));
}
else {
Mage::getSingleton("checkout/session")->setData("coupon_code","");
@srinathweb
srinathweb / date interval
Created September 1, 2016 03:16
date interval
<?php
$start = new DateTime( '2013-10-01' );
$end = new DateTime( '2014-01-01 23:59:59' );
$interval = new DateInterval('P1D');
$period = new DatePeriod($start, $interval, $end);
// only trigger every three weeks...
$weekInterval = 3;
@srinathweb
srinathweb / Url.php
Created May 11, 2016 09:44 — forked from jaromirmuller/Url.php
checkout/bag url rewrite
class Getready_Rewrite_Model_Core_Url extends Mage_Core_Model_Url {
/**
* Build url by requested path and parameters
*
* @param string|null $routePath
* @param array|null $routeParams
* @return string
*/
public function getUrl($routePath = null, $routeParams = null) {
@srinathweb
srinathweb / observer
Created February 25, 2016 05:32
observer
http://stackoverflow.com/questions/19393729/calling-a-magento-event-observer-after-payment-capture
@srinathweb
srinathweb / local.xml
Created January 12, 2016 05:58 — forked from Maksold/local.xml
Magento XML - local.xml boilerplate
<?xml version="1.0"?>
<layout>
<default>
<!--Root/Default Layouts-->
<reference name="root">
<!--Appending Block-->
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</reference>
<!--CSS and JS Files-->