magento-1.7

Import Orders in Magento through CSV

☆樱花仙子☆ 提交于 2019-12-05 04:26:52
问题 I have used below code. It is working on simple product and single product. Creating order programmatically for all types of products. First I have added product into the cart, then I have added all parameters to order like shipment, payment method and billing and shipping method accordingly. When I add options to the product it generates blank product order. But it is not working for other product types. I used below script also, http://pragneshkaria.com/programmatically-create-order-in

Magento conditional block in layout xml

六月ゝ 毕业季﹏ 提交于 2019-12-05 04:21:41
问题 is it impossible or in layout xml file write condition if isset get param x that x.phtml else y.phtml? I see solve this problem in action controller. But I overwrite action in other module. And I think xml is better. Actualy I have one register form to affiliate program from done module. I want overwrite this action and show 1 from 2 forms. According what is in get param value. 回答1: there is a way how you can do this with nearly pure xml: background: you can call function from you xml, which

Add custom discount order in total with button

旧时模样 提交于 2019-12-05 03:23:55
问题 I have my module with my custom discount and it's OK. config.xml: <sales> <quote> <totals> <aver> <class>Dani_Prueba_Model_Total_Aver</class> <after>subtotal</after> </aver> </totals> </quote> </sales> My module: <?php class Dani_Prueba_Model_Total_Aver extends Mage_Sales_Model_Quote_Address_Total_Abstract{ public function collect(Mage_Sales_Model_Quote_Address $address){ $baseDiscount = 2.5; $discount = Mage::app()->getStore()->convertPrice($baseDiscount); $address->setCustomDiscount(

Magento Soap API V2 Response Content Length Incorrect

北城余情 提交于 2019-12-05 02:17:02
问题 We are trying to connect our magento installation with a third party stock management app(built on .net). But the sync is not working, the third party tells me that the soap api is returning an empty response. I have been pulling my hear out, because whenever I make anything in PHP the API works fine. In addition inventory updating works fine, but retrieving order/invoice information does not (well it actually does occasionally 1% of the time) With the intermittent nature we felt that it must

Magento Product Collection Select all Attributes

瘦欲@ 提交于 2019-12-05 01:09:49
问题 I'm trying to create a model that selects a specific product and all it's attributes. $products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*'); But sadly although I have done this hundreds of times before, we're having a Magento moment... echo $products->getSelect()->__toString(); reveals that ->addAttributeToSelect is ignoring me. SELECT `e`.* FROM `catalog_product_entity` AS `e` Of course in typical Magento fashion there are no exceptions or errors of any

Magento : System/Config Add Custom Value in MultiSelect

此生再无相见时 提交于 2019-12-05 00:11:37
问题 i have created one simple Module. i have created system.xml. there is one field Multiselect i want to add custom Value in multiselect field. is it possible to add custom Value in multiselect field ? <Data translate="label"> <label>Select Socail Media</label> <comment>Select Social Media To fdisplay ion Front Side</comment> <front_end_type>multiselect</front_end_type> <source_model>adminhtml/system_config_source_country</source_model> <sort_order>3</sort_order> <show_in_default>1</show_in

Magento add custom field in One-Page checkout shipping and billing address

时间秒杀一切 提交于 2019-12-04 21:51:04
I am new in Magento. I want to add more fields in onepage checkout billing and shipping address. I have followed this Link http://excellencemagentoblog.com/magento-adding-custom-field-to-customer-address But its not working for me. if you are using magento versions 1.6 above than you can copy "billing.phtml" from "app\design\frontend\base\default\template\persistant\checkout\onepage" to "app\design\frontend\default\your_theme\template\persistant\checkout\onepage".Then you have to add your custom fileds in it. Find <?php if ($this->canShip()): ?> this line in your billing.phtml and add your

compare only those product who have same category magento

≡放荡痞女 提交于 2019-12-04 21:13:50
i want to compare only those category who have same parent, for Example, user can compare nokia mobile with samsung mobile but if user want to compare nokia mobile with shoes than it will not allow to compare those products Help is greatly appriciated Thank You in Advance In app\code\core\Mage\Catalog\controllers\Product\CompareController.php\ make changes like the following if ($product->getId() /* && !$product->isSuper() */ ) { $categoryIds = $product->getCategoryIds(); if (is_array($categoryIds) and count($categoryIds) > 1) { $cat = Mage::getModel('catalog/category')->load($categoryIds[2]);

Magmi Bundled Products and Re-indexing issue in Magento 1.7

回眸只為那壹抹淺笑 提交于 2019-12-04 19:50:56
I am using Magento 1.7x version.I need to create a script to import products.I used Magmi as an Import Product Tool which helps me to import Simple ,Grouped and Configurable Products not bundle products create a script to run a cron job to automate the process. Problem : My products are not showing on front end whereas these are visible on backend.I studied somewhere and i find its about re-indexing the database tables. Questions : 1. How to rebuild index (script is cron job)after running a Magmi import process because i am unable to rebuild index using: =>On the fly indexer v0.1.5 =>Magmi

Using column aliases in Sales Order Grid field

假装没事ソ 提交于 2019-12-04 19:46:21
I'm trying to add two fields ( Shipping Postcode and Billing Postcod ) to Magento 1.7CE's backend Sales grid. I'm doing this by overriding Mage_Adminhtml_Block_Sales_Order_Grid::setCollection(...) to join the table with sales/order_address . public function setCollection($collection){ parent::setCollection($collection); $collection->getSelect()->join( array('address_shipping' => $collection->getTable("sales/order_address")), 'main_table.entity_id = address_shipping.parent_id AND address_shipping.address_type = "shipping"', array('postcode') ); $collection->getSelect()->join( array('address