magento-1.5

Magento ordering collections after adding items

雨燕双飞 提交于 2019-12-12 03:14:44
问题 i have this method on which i retrieve first a Varien_Data_Collection and then I add items one by one from another Varien_Data_Collection by addItem(): protected function _prepareCollection(){ $productId = $this->getRequest()->getParam('id'); $websiteId = 0; if ($store = $this->getRequest()->getParam('store')) { $websiteId = Mage::app()->getStore($store)->getWebsiteId(); $collection = Mage::getModel('productalert/stock') ->getCustomerCollection() ->join($productId, $websiteId); foreach (

Cannot login to any Magento store admin and frontend only for my system

北慕城南 提交于 2019-12-12 02:55:01
问题 I am not able to login to any magento store (even the demo magento store hosted on magento website). It was working fine a few days ago but now I am not able to login and my work is pending. I even tried to clear my cache bt nothing happend. Can you all help ?? 回答1: Erase everything in var/session and try to login again. 回答2: What Browser are you using? When I tried to log in with Chrome, it didn't work. Then I tried logging in on Opera and it worked. 回答3: If the following is true even the

Display specific category products on no results search page

此生再无相见时 提交于 2019-12-12 00:45:26
问题 When we search for a wrong keyword like "sdfsdf" in magento site, it displays that "your search returns no results". Here I want to display any category products like "similar products" category as we display "best sellers" on home page. I have tried by calling the block in the catalogsearch.xml. BUt catalogsearch.xml doent contain any block for no results. So how can I display any category products on no results page. I have an idea like can we display a specific category products on .phtml

Magento- How to passing data between model and controller

南楼画角 提交于 2019-12-11 17:26:42
问题 Thanks for previous replies, I am new to magento framework. can anyone guide me how to get the return values from model to controller. in simple i want to return the values from model folder to controller action. 回答1: I think this will do what you want $collection = Mage::getModel('<module>/<module>')->getCollection(); <module> represents model name 回答2: In Magento, controller sets values on Models, then Blocks and templates reads them from the those Models. For example, we can set a string

Trying to install a Magento Module that seems to not be Compiler Compatible - Magento 1.7.0.2

▼魔方 西西 提交于 2019-12-11 11:04:43
问题 trying for some time how to install magento extension on magento 1.7.0.2 Cash On Delivery by mage specialist - http://www.magentocommerce.com/magento-connect/cash-on-delivery-6259.html tried three steps 1) disable cache and compliation , install the extension and reenable the cache and compilation 2) disable compliation and cache , install the extension and enable the compilation and cache getting errors : Fatal error: Class ‘MSP_CashOnDelivery_Helper_Data’ not found in /home/bwcom/public

Cannot access homepage of Magento hosted on GoDaddy [closed]

谁都会走 提交于 2019-12-11 08:28:41
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I am using Magento on a GoDaddy's shared hosting account, I have just configured it and able to see the home page, but not the other pages, What could be the issue? Anything in .htaccess ? Current hosting path is /home/content/42/9469242/html 回答1: From the Magento wiki : A common error, which usually comes up if

How to remove a product from a category magento 1.5

走远了吗. 提交于 2019-12-11 03:35:22
问题 I'm kind of new in Magento and I'm working on a cron job that removes a product in a specific category after the date that was assigned. With work and the help of Stackoverflow, I came up with this code: require_once 'app/Mage.php'; Mage::app(); $date = Mage::getModel('core/date')->date('Y-m-d H:i:s'); $collection = Mage::getModel('catalog/product')->getCollection(); $collection->addfieldtofilter('news_to_date', array(array('to' => $date))); foreach($collection as $product) { $product-

How to make Magento support some French Characters?

泪湿孤枕 提交于 2019-12-11 02:49:06
问题 I've been trying to make Magento support some french characters but haven't got any success so far. The French text that I would want to display is: Vous aimerez peut-être aussi But somehow, it appears like this: Its been the same with several other characters. Magento does use UTF-8 by default, but still these characters are not being displayed (surprisingly, because StackOverflow is using UTF-8 and is able to display the characters) I noticed that ISO-8859-1 is able to display them, tried

how to call newsletter/subscribe.phtml on cms/content_home.phtml?

风流意气都作罢 提交于 2019-12-11 02:26:11
问题 I want to make a newsletter subscription box on home page in content area, and for that I have made a CMS page that other code I have placed in the newsletter subscription file can call too. I am trying to call it like this: <?php echo $this->getLayout()->createBlock('newsletter/subscribe')->setTemplate('newsletter/subscribe.phtml')->toHtml(); ?> but it does not show up. Why ? 回答1: system -> configuration -> advanced from there enable newsletter module. and then you can use the above code to

Loading objects based on URL parameters in Magento

こ雲淡風輕ζ 提交于 2019-12-10 18:02:54
问题 I am having trouble creating a custom module for my Magento store. I have successfully added a route (/landing), and created/layout files that display template content within my base layout. I now need to move beyond that a bit. I want to be able to load a parameter from a URL, grab an object based on that parameter, and display things based on the contents of my object. Example: User browsers to domain.com/landing/cool/. This (hopefully) would call the landing controller. Controller would