magento-1.7

How to import products images from external url in magento 1.7.0?

℡╲_俬逩灬. 提交于 2019-12-11 19:16:43
问题 I want to import some products images in 'media/import' directory from a external source url in magento 1.7 version. Someone please help me ! 回答1: Here is an example $image_location = getDownloadImage("product",$image_url); if ( file_exists($image_location) ) { $product->addImageToMediaGallery($image_location,array('thumbnail','small_image','image'),true,false); } // Download Image public function getDownloadImage($type,$file){ $path = str_replace("index.php","",$_SERVER["SCRIPT_FILENAME"]);

How to the installer after package data has been created - Magento

拥有回忆 提交于 2019-12-11 13:34:23
问题 I followed this tutorial and was able to create the package data successfully as shown in the screenshot. Now I have below three file in the var/connect folder. Myname_Mygateway-1.0.0.tgz, Myname_Mygateway.xml, package.xml as shown below. I tried to zip all the files and make a installer but It does not work when I tried to install in another magento site. How to the installer after package data has been created ? 回答1: You don't need to zip anything. The file with extension .tgz is only

Hiding Magento's Layered Navigation from Search Engines

拟墨画扇 提交于 2019-12-11 12:09:48
问题 I’m hoping someone can help me with this problem I’ve been trying to solve for the past few days. I want to hide Magento’s Layered Navigation from the search engines entirely, but make it available to users. For SEO reasons, I don’t want to settle for NoFollowing all the links, or using noindex follow meta tags, or even blocking it entirely with Robots.txt. The most effective way of handling this would be only showing the layered Navigation to users with Cookies enabled, since Google doesn’t

Donot want show Magento home using htaccess file

筅森魡賤 提交于 2019-12-11 11:46:25
问题 I want to redirect home page to another page using access, which is not an magento page.But i want show all other pages of magento. event: example.com redirect to example.com/index.html (which is not an magento page) example.com/index.php redirect to example.com/index.html (which is not an magento page) but i want to show other magento pages ... 回答1: Why not just use the directoryindex directive? In htaccess you can put this at the top to specify your root index file. DirectoryIndex index

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

Multiple grid in Magento admin

蓝咒 提交于 2019-12-11 10:29:12
问题 I am creating custom module in Magento. Please tell me How to add multiple grid in Magento admin? Or add some data after or before the grid. Thanks in advance 回答1: Yes you can in following steps Lets say you have module called Mycompany_Mail. And you want to create two grids called SentTray & RecvdTray 1) create a file Grid.php to create a class Mycompany_Mail_Block_Adminhtml_SentTray_Grid class under the folder Mycompany/Mail/Block/Adminhtml/SentTray/ and write the code to prepare columns

Sales order grid Filter & Sorting not working in Magento

删除回忆录丶 提交于 2019-12-11 07:39:18
问题 I would like to show the customer email in Magento sales order grid. I have to rewrite the Mage_Adminhtml_Block_Sales_Order_Grid in my local module to added the new column for customer email. I got the value of email for each order but sorting and filtering not working as expected. I was spent more than a day for sorting this issue but no luck. Also, I referred few of answers in SO too. Below is the code which is I have tried referring this answer, public function setCollection($collection) {

customer session is empty in custom module magento

送分小仙女□ 提交于 2019-12-11 07:24:56
问题 i have made a custom module which uses customer session, but its strange, on live site its not returning customer data. i have tried following methods: $sessCustomer = Mage::getSingleton('customer/session', array('name' => 'frontend')); echo '<pre>';print_r($sessCustomer->getCustomer()->getData()); echo '</pre>';exit; it returns: Array ( [website_id] => 1 ) if i print the customer session: Mage::getSingleton('customer/session')->getData(); this returns (exact output): array( [_session

Add Top Links on condition basis in magento

。_饼干妹妹 提交于 2019-12-11 07:04:43
问题 I am little bit stuck with adding top links in my custom phtml.I removed the links block in my xml <remove name="top.links"/> , now after some condtion become true i want to add this block again.When i use this code for top menu it works but not for links $block = Mage::getSingleton('core/layout'); echo $block->createBlock('catalog/navigation')->setTemplate('catalog/navigation/top.phtml')->toHtml(); This works and disply top menu.But the below code doesn't show anything. $block = Mage:

Magento 1.7 Cannot send headers; headers already sent in

别说谁变了你拦得住时间么 提交于 2019-12-11 06:46:07
问题 SOLVED I solved this issue with Jonathan Hussey help I changed this line: $mModel->getCollection()->load($mId)->getData(); for this: $mModel->getCollection()->addFieldToFilter('met_id',$Id)->getSelect(); Problem I created custom module which added tab to admin product page with additional text field. When I try save this product I get this error: a:5:{i:0;s:140:"Cannot send headers; headers already sent in /home/nano/domains/mydomain/public_html/gw/lib/Varien/Data/Collection/Db.php, line 693"