All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
26 views

Unable to override model class, only this file has problem

I am overriding Worldpay Model class that create xml request file. <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
6
votes
2answers
139 views

Proper way to call a model constant in Magento 1

I have the class below: class Company_Module_Model_Somemodel extends Mage_Core_Model_Abstract { const SOME_CONST = 'constant_text'; } What is the proper and correct way to call the constant ...
0
votes
1answer
698 views

Magento 2: Override product image JPG quality

Magento 2.2.1 with custom theme which inherits from Magento/blank. Attempting to fix the JPG compression for product images. I know, based on this solution, that I must extend the Image class found ...
0
votes
1answer
639 views

What does this code do in magento? $this->_init('weblog/blogpost');

This is my model Class <?php class Magentotutorial_Weblog_Model_Blogpost extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('weblog/blogpost'); } } ?> My ...
1
vote
1answer
176 views

model rewrite not working in admin side [closed]

i have rewritten fedex.php model file(collect rates method only). its working in front end cart and checkout pages. But its not working in admin side order creation.Can you help any one? update: ...
7
votes
1answer
7k views

Usage of getsingleton() and getModel()

Is there a set of guidelines that I can go by to decide when I should use mage::getModel() and mage::getSingleton() From what I can tell it seems as though getSingleton either gets an existing ...
3
votes
2answers
3k views

Magento collection classes confusion

I confused by following collection classes $orders = Mage::getResourceModel('sales/order_item_collection'); $orders = Mage::getResourceModel('sales/order'); $orders = Mage::getResourceModel('sales/...
2
votes
4answers
2k views

How to call Mage_Page_Block_Html_Pager class in list.phtml

I am wanting to include a larger than normal 'next page' type button in the list.phtml template whilst still having the normal pagination from pager.phtml The function I'm wanting to use is found in ...
0
votes
2answers
154 views

Model Class Fallthrough

I created a new model class called Company_CatalogSearch_Model_System_Config_ListSort which I used to create a copy of the Product Listing Sort By option from the catalog module, just for the ...
3
votes
1answer
1k views

How are magento lib files loaded - Sage lib class not being accessed by model

On a mage site using sagepay, inside the Sagepaysuite model there is a call to a class file: Ebizmarts/SagePaySuite/Model/Api/Payment.php $xml = new Ebizmarts_Simplexml_Element('<customer />...