This file contains hidden or 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 | |
| public function getZastKod($fiscalInvoice, $store, $invoice = null) | |
| { | |
| if ($invoice === null) { | |
| $invoice = Mage::getModel('sales/order_invoice'); | |
| $invoice->load($fiscalInvoice->getInvoiceEntityId()); | |
| } | |
| $cert = Mage::getModel('inchoo_fiskalizacija/cert'); |
This file contains hidden or 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 | |
| public function generateRacunZahtjevXML($fiscalInvoice, $invoice, $store, $storniraj = false) | |
| { | |
| $helper = $this; | |
| $grandTotal = floatval($invoice->getGrandTotal()); | |
| $PDV = $grandTotal * ($helper->getRacunPdvPorezStopa($store) / 100); /* Replace 25 with config option */ | |
| $ns = 'tns'; |
This file contains hidden or 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/* |
This file contains hidden or 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 hidden or 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 hidden or 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 <[email protected], http://foggyline.net> | |
| */ | |
| public function automateMagentoConnectInstallAction($username, $password, $website, $packages) | |
| { | |
| /* | |
| $username = 'MAGENTO-ADMIN-USER'; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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__.'} | |
| ); | |
| } |