magento-1.4

Loading a Magento mail template and fill its vars from code?

徘徊边缘 提交于 2019-12-06 05:04:34
问题 I am loading my mail template like this: $mailTemplate = Mage::getModel('core/email_template'); $myTemplate = $mailTemplate->load($templateId); Now I can get the template content using: $text = $myTemplate ->getData('template_text'); This works, but $text still contains the placeholders for the variables, like {{var myvar}} or {{store url=""}}. Is there a way to fill those placeholders when loading the template without sending the mail? I want to show the text to the user, but with filled

In Magento after installing extension Admin panel in unable to load

一个人想着一个人 提交于 2019-12-06 04:40:56
As I have assigned to work on magento, according to our requirement i tried to install Arabic extension for magento. The extension got successfully installed. Later on refreshing the admin panel, it shows the URL not found. The Stores FrontEnd CMS home page is loading, But when Iclick on any products, it shows again URL not found.. How can i solve this... When diagnosing things like this, try the following.. Delete (or move to another folder) files in /var/www/var/cache Delete (or move to another folder) files in /tmp From a shell, run /var/www/shell$ php indexer.php --reindexall You've just

Before And After In Local.xml Magento?

我是研究僧i 提交于 2019-12-06 04:24:32
问题 I've managed to get to the point where I understand how to move blocks from column to column in my Magento layouts: via specifying a "left" or "right" attribute in the <reference> tag. However, I don't understand how to change the order in which blocks appear. I've noticed that the "before" and "after" attributes of the <block> tag have something to do it with, but I'm not sure how they work. If I want to move a block from the top of its area to anywhere else in our page, what's the proper

Magento order import/export [closed]

谁说我不能喝 提交于 2019-12-05 22:35:49
Is there any way to import/export the orders from magento. Since we have magento store on live and another dev. version is ready with greatest change now we only need to import the magento orders alone. Here i can see only export - http://www.magentocommerce.com/magento-connect/slandsbek/extension/1350/simple-order-export But how can i import the order data into new store. sucitivel Try this: http://www.commerceextensions.com/magento-dataflow-batch-import-export-orders-to-csv.html It's $99 but there's no simple answer to your problem. If you're not willing to pay for an extension, then

Magento EAV: how to hard delete an attribute value?

谁说胖子不能爱 提交于 2019-12-05 19:25:07
Let's ask the question clearly before entering into the details: Is there a way of hard deleting an attribute value from a product? By hard I mean, removing the row from the database and not only setting the value to null or empty. Now, the details: I'm currently confronted to a problem on Magento. Many product in my store have user defined attributes that are not related to the product. For example, let's say we have a bag product, among other products like t-shirts,dresses,pants ,etc.: Our bag product has only configurable 1 attribute: color . Our T-Shirt product has 2 configurable

Linking to Magento Admin from Outside Admin Panel

十年热恋 提交于 2019-12-05 11:39:39
I'm trying to build some CRM tools that send emails to my sales guys and link back to pages inside the Magento Admin. I've been building the URLS like this: Mage::getUrl('*/quotes/edit', array('id'=>$quote->getQuoteId(), '_current'=>true)) The problem is it only sends them to the dashboard. I'm assuming it is because the setting for "_current" is changed when they login, thus invalidating the link and sending them to the default page. Any ideas on how I could make a link into the Admin that doesn't include the session in the url? Disabling secret key from admin URLs should solve your problem.

How To Get Sub Categories in Magento ?`

吃可爱长大的小学妹 提交于 2019-12-05 08:53:57
问题 I am playing with magento's home page where I have created a tab Which Shows all the categories including Root, categories, and Sub Categories (In One Tab). Now I want to Show Only Main Categories( Whose Parent Is Root) in main Tab And under Each Category I want to List Their respective Sub Categories. I wrote The following Code to achieve a part of this, MODEL CLASS public function getsubCategory($parent) { $subcategoryCollection = Mage::getModel('catalog/category') ->getCollection() -

How do I add a filter on a product attribute to Magento Advanced Export Profiles?

我与影子孤独终老i 提交于 2019-12-05 04:31:00
问题 I want to filter my data to csv using the "Manufacturer" field. I tried this, but it didn't work: <action type="catalog/convert_adapter_product" method="load"> <var name="store"><![CDATA[0]]></var> <var name="filter/manufacturer"><![CDATA[898]]></var> </action> <action type="catalog/convert_parser_product" method="unparse"> <var name="store"><![CDATA[0]]></var> <var name="url_field"><![CDATA[0]]></var> </action> <action type="dataflow/convert_mapper_column" method="map"> <var name="map"> <map

Mark a Magento order as complete programmatically

吃可爱长大的小学妹 提交于 2019-12-04 21:04:59
问题 I'm trying to mark a "Processing" order as Complete when I get a certain response back from a third party service. I've got everything set up for this, but the only problem is that orders are staying in the Processing state. I'm generating an invoice (I don't think I need this though, as each item is marked as "invoiced" in the Magento backend) and a shipment like so: $order = Mage::getModel('sales/order')... (etc) $shipment = $order->prepareShipment($quantities); $shipment->register();

Show recent_viewed products on product Page

↘锁芯ラ 提交于 2019-12-04 15:06:56
The Current default functionality of magento is that it shows the recently viewed products on right side of category page. Now I would like to display the same content on at the bottom of product page. the phtml file used is named at location as frontend/base/default/template/reports/product_viewed.phtml . Is there any simple way to do it ? In your theme you will modify the catalog.xml file (/app/design/frontend/{your theme}/default/layout/catalog.xml). Find the following section and add a block call for the template towards the bottom of the content reference. <catalog_product_view translate=