Skip to content

Instantly share code, notes, and snippets.

View refaelgold's full-sized avatar
🎯
Focusing

Nir Goldman refaelgold

🎯
Focusing
View GitHub Profile
$this->getOnepage()->getQuote()->getShippingAddress();
$this->getOnepage()->getQuote()->setTotalsCollectedFlag(false);
$this->getOnepage()->getQuote()->collectTotals();//i think this is right
$this->getOnepage()->getQuote()->save()
$subtotal = Mage::getSingleton('checkout/session')->getQuote()->getGrandTotal() - Mage::getSingleton('checkout/session')->getQuote()->getShippingAmount();
@refaelgold
refaelgold / autoshipping.php
Created May 18, 2016 16:30 — forked from herveguetin/autoshipping.php
Set shipping method and rate if they do not exist yet in Magento
<?php
/**
* Has shipping been applied to quote?
*
* @var bool
*/
protected $_hasShipping = false;
/**
http://scotch.io/tutorials/javascript/submitting-ajax-forms-the-angularjs-way
@refaelgold
refaelgold / gist:7332561
Created November 6, 2013 08:09
STARTTECH/system/model/model.php 2 query sql
// Events and evenet
public function EventAllInfo($url)
{
global $db;
// return a variable
$db->query("SELECT id FROM `mod_pages` WHERE type='events' AND url='other'");
@refaelgold
refaelgold / gist:7318087
Created November 5, 2013 12:04
STARTTECH/system1113/admin/menus/index.php
<?php
/**
* @author Ron-Pro
* @copyright 2008
*/
// explode pages data
$query = $db->select("SELECT * FROM `mod_pages` WHERE `active`='1' ORDER BY `id` DESC");
@refaelgold
refaelgold / gist:6671468
Last active December 23, 2015 17:49
this gist its for composer.phar need to be luanch with git command line need to install composer first put all the zf2 Library in the vandor of zend skeleton application
{
"repositories": [
{
"type": "composer",
"url": "https://packages.zendframework.com/"
}],
"require": {
"zendframework/zendframework":"2.2.4"
,"zendframework/skeleton-application":"dev-master"
html, body, .container, .content {
height: 100%;
}
.container, .content {
position: relative;
}
.proper-content {
padding-top: 40px; /* >= navbar height */