magento-1.7

Fishpig: Autologin not working authentication exception because of index.php

送分小仙女□ 提交于 2019-12-24 00:48:38
问题 I have Fishpig Wordpress Integration installed along with Magento CE 1.702. Wordpress is set up like this : Database Charset utf8 Table Prefix wp_ integration Integrate Theme Yes Home URL blog Path wp Single Store no I removed index.php from the frontend using this rewrite rule : `<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>` The problem is

Magento Not Showing Products to Users who are Not Logged in

帅比萌擦擦* 提交于 2019-12-23 18:41:59
问题 Using Magento CE 1.7, I have uploaded multiple csv files to create categories, create a lot of products, and assign the products to the correct category. I don't know when precisely it happened, but about two weeks ago I noticed that the category listings pages would stop showing the products on the front-end. I have spent nearly half of the development time for this project trying to get the category pages to consistently show the products. Today I noticed that, again, the category pages no

Get information about customer by email id in magento

﹥>﹥吖頭↗ 提交于 2019-12-23 14:57:01
问题 I want to get information of customer by email id, so i create a method in controller with content: public function showAction(){ $customer_email = "abc@mail.com"; $customer = Mage::getModel("customer/customer"); $customer->setWebsiteId(Mage::app()->getWebsite()->getId()); $customer->loadByEmail($customer_email); echo $customer->getId(); echo $customer->getFirstName(); echo $customer->getEmail(); } but when run it return null value, i don't know why?. please help me 回答1: In your system

Magento : Add Product to cart with custom price using observer

情到浓时终转凉″ 提交于 2019-12-23 06:21:16
问题 i have an input in product page that allows to customers to change the price : i followed that tutorial : http://magentotutorial.org/programmatically-add-product-cart-price-change-magento/ and this is my code : config.xml : <events> <core_block_abstract_to_html_after> <observers> <customprice> <type>singleton</type> <class>WebDirect_CustomPrice_Model_Observer</class> <method>convertPricespanToInput</method> </customprice> </observers> </core_block_abstract_to_html_after> <checkout_cart

How to get the collection of “instock” products through Resource Model in Magento

﹥>﹥吖頭↗ 提交于 2019-12-23 05:32:24
问题 Is it possible to fetch the collection of "in stock" products through resource model in Magento ? I have tried this code $collection = Mage::getResourceModel('catalog/product_collection') ->addAttributeToSelect('*'); $collection->addAttributeToFilter('is_in_stock', 0); But it is throwing Fatal error 回答1: try below code $productCollection = Mage::getResourceModel('catalog/product_collection'); Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($productCollection); echo

How to get the collection of “instock” products through Resource Model in Magento

梦想的初衷 提交于 2019-12-23 05:32:05
问题 Is it possible to fetch the collection of "in stock" products through resource model in Magento ? I have tried this code $collection = Mage::getResourceModel('catalog/product_collection') ->addAttributeToSelect('*'); $collection->addAttributeToFilter('is_in_stock', 0); But it is throwing Fatal error 回答1: try below code $productCollection = Mage::getResourceModel('catalog/product_collection'); Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($productCollection); echo

Magento Core Config Data Cache

人走茶凉 提交于 2019-12-23 05:23:53
问题 I had some configuration data caching issues in my magento frontend that, I cannot get new shipping rates/get template path hints/ etc.. core_config_data table get updated correctly and All backend data shown correcty. I tried "Flush Magento Cache" button, cleaning <DocumentRoot>/tmp directory, cleaning var/cache directory (This issue is noticed 2 weeks before and I moved the site to new VPS a month before) Any ideas?? 回答1: Check file/folder permissions, the non-flushable, ever magically

Fishpig Wordpress Magento Post issue

北城以北 提交于 2019-12-23 04:56:10
问题 How to retrieve recent posts on the basis of its corresponding category in fishpig wordpress magento integration? 回答1: $numPostsToShow = 2; $categoryId = 1; //Replace with your category id $recentPostCollection = Mage::getModel('wordpress/post')->getCollection() ->addIsPublishedFilter() ->addCategoryIdFilter($categoryId) ->setOrder('post_date', 'desc') ->setPageSize($numPostsToShow) ; EDIT The Fishpig Wordpress module registers the current wordpress category as 'wordpress_category' So to

Fatal error: Call to a member function getWelcome() on boolean [closed]

梦想与她 提交于 2019-12-23 04:49:12
问题 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 days ago . I get php fatal error: Call to a member function getWelcome() on boolean in /home/cloudpanel/htdocs/domain.com/app/code/core/Mage/Page/Block/Html/Welcome.php on line 43. How to solve this error in Magento 1.7? class Mage_Page_Block_Html_Welcome extends Mage_Core_Block_Template { /** * Get block messsage * *

magento tabbed backend like catalog/product for custom entity

北慕城南 提交于 2019-12-23 02:26:28
问题 I want to write a module with a custom entity. In the backend it shall look like the backend from products (tabs on the left, forms on the right). I tried many variants and inspected/copied many things from the core to understand it... well I don't. Knows anyone a tutorial or the neccessary key points to realize this? Many thanks Edit: well, it's not the problem to create own entities, this is well known. I need help to create the backend, so that the result looks like the tabbed form when