This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$params = $this->getRequest()->getParams(); | |
$checkoutMethod = Mage_Checkout_Model_Type_Onepage::METHOD_CUSTOMER; | |
$shippingMethod = $params['shipping_method']; | |
$payment = $params['payment']; | |
$party = Mage::getModel('juvalia/party') | |
->load($this->getRequest()->getParam('id', 0)); | |
if (!$party->getId()) { | |
$this->_forward('noRoute'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function parse_signed_request($signed_request, $secret) | |
{ | |
list($encoded_sig, $payload) = explode('.', $signed_request, 2); | |
// decode the data | |
$sig = $this->base64_url_decode($encoded_sig); | |
$data = json_decode($this->base64_url_decode($payload), true); | |
if (strtoupper($data['algorithm']) !== 'HMAC-SHA256') { | |
error_log('Unknown algorithm. Expected HMAC-SHA256'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#" onclick="sendFacebookInvite();">Facebook Invite</a> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
function sendFacebookInvite() { | |
FB.ui({ | |
method: 'apprequests', | |
message: 'Pozivamo vas da se pridruzite __NAZIV_WEB_SITEA__.'} | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<frontend> | |
<events> | |
<websiterestriction_frontend> | |
<observers> | |
<privon_websiterestriction_frontend> | |
<class>xxxxxxx/observer</class> | |
<method>allowFacebookApiThroughRestriction</method> | |
</privon_websiterestriction_frontend> | |
</observers> | |
</websiterestriction_frontend> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//START Fake your online customer number | |
$countLimit = 200; | |
$fakedCount = $countLimit; | |
$countSelect = Mage::getModel('log/visitor_online') | |
->prepare() | |
->getCollection() | |
->getSelectCountSql(); | |
$count = $countSelect->getAdapter()->fetchOne($countSelect); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$params = array(); | |
$params['limitPage']['page'] = 1; | |
$params['limitPage']['rowCount'] = 200; | |
$params['order']['column'] = 'log_id'; | |
$params['order']['direction'] = 'ASC'; | |
$params['where']['condition'] = 'priority_name = "DEBUG"'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Branko Ajzele <ajzele@gmail.com, http://foggyline.net> | |
*/ | |
public function automateMagentoConnectInstallAction($username, $password, $website, $packages) | |
{ | |
/* | |
$username = 'MAGENTO-ADMIN-USER'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function apiautoadjustAction() | |
{ | |
$username = $this->getRequest()->getParam('username', null); | |
$password = $this->getRequest()->getParam('password', null); | |
$response = new Varien_Object(); | |
if ($username && $password) { | |
$user = Mage::getModel('admin/user') | |
->loadByUsername($username); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
$quote = Mage::getModel('sales/quote') | |
->setStoreId(Mage::app()->getStore('default')->getId()); | |
$product = Mage::getModel('catalog/product')->load(6); /* 6 => Some product ID */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* | |
!.gitignore | |
!app/ | |
!app/code/ | |
!app/code/community/ | |
!app/code/community/MyCompany/ | |
!app/code/community/MyCompany/Extension/ | |
!app/code/community/MyCompany/Extension/* |