magento-1.5

Magento 1.5, numeric SKUs and productIdentifierType

独自空忆成欢 提交于 2019-12-01 08:11:39
问题 In Magento 1.5, accessing the catalogProductInfo API call from C# like this works with non-numeric SKUs: catalogProductRequestAttributes fetchattrib = new catalogProductRequestAttributes(); fetchattrib.attributes = new string[] { "name", "description", "and_so_on"}; fetchattrib.additional_attributes = new string[] { "custom_attribs_go_here"}; string storeView = null; string productIdentifierType = null; catalogProductReturnEntity ret = m_magentoClient.catalogProductInfo( sessionId, sku,

How to get the URL of a page/section in Magento admin

偶尔善良 提交于 2019-12-01 06:25:11
问题 I can't seem to find a definitive answer on this one. How do you get a url to a page in the admin backend? For example, let's say I have a module that uses a controller with a frontname of mymodule . If I call: $this->getUrl('mymodule/controller/action') I get: http://mydomain.com/index.php/mymodule/controller/action This doesn't work because it doesn't have the admin frontname included. I found this thread that mentions using this: Mage::helper("adminhtml")->getUrl(); However that doesn't

Magento - How do you return results of unlimited CMS Static blocks (with certain “Identifier”) to a CMS Page

只谈情不闲聊 提交于 2019-12-01 03:15:47
Quick Overview: I am trying to return results from a specific set of static blocks to a phtml file (which is then called on from a cms page ) in Magento . Note: I've been searching all over google and some answers get me closer than others but nothing I've tried seems to work 100%? Details: I already have a set of specific static blocks that all start with an identifier of testimonial- . For example, each static block is like this: testimonial-1 , testimonial-2 , testimonial-3 and so on. I have a total of 5 on my dev site (more on live site but that is no consequence here). I have a CMS Page

how to get category name of current product (on product detail page) in magento

一个人想着一个人 提交于 2019-11-30 20:48:55
I used following codes but didn't work for this case: $_category_detail=Mage::registry('current_category'); echo $_category_detail->getName(); got Fatal error: Call to a member function getName() on a non-object in /app/design/frontend/base/default/template/catalog/product/view.phtml we make some filters and use below mention code in head.phtml: $is_product = Mage::registry('product'); if($is_product){ if(is_object(Mage::registry('current_category'))){ $category_name = Mage::registry('current_category')->getName(); } else{ $category_name = ""; } } But this only works if you go from a category

Magento: Adding new products programmatically

自古美人都是妖i 提交于 2019-11-30 13:57:45
问题 I am trying to add products to Magento 1.5 programmatically. My script will ultimately be a cron job, regularly updating and adding products as dictated by an XML file supplied by the accounts system. I have a problem in creating new products. The relevant code segment from my script is: $attributeSetId = 4; //$newproduct = Mage::getModel('catalog/product'); $newproduct = new Mage_Catalog_Model_Product(); $newproduct->setTypeId('simple'); $newproduct->setWeight($product->UnitWeight);

Magento: Adding new products programmatically

两盒软妹~` 提交于 2019-11-30 08:59:25
I am trying to add products to Magento 1.5 programmatically. My script will ultimately be a cron job, regularly updating and adding products as dictated by an XML file supplied by the accounts system. I have a problem in creating new products. The relevant code segment from my script is: $attributeSetId = 4; //$newproduct = Mage::getModel('catalog/product'); $newproduct = new Mage_Catalog_Model_Product(); $newproduct->setTypeId('simple'); $newproduct->setWeight($product->UnitWeight); $newproduct->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH); $newproduct->setStatus(1);

how to get category name of current product (on product detail page) in magento

旧巷老猫 提交于 2019-11-30 05:18:33
问题 I used following codes but didn't work for this case: $_category_detail=Mage::registry('current_category'); echo $_category_detail->getName(); got Fatal error: Call to a member function getName() on a non-object in /app/design/frontend/base/default/template/catalog/product/view.phtml we make some filters and use below mention code in head.phtml: $is_product = Mage::registry('product'); if($is_product){ if(is_object(Mage::registry('current_category'))){ $category_name = Mage::registry('current

Magento - get rule from coupon code

喜你入骨 提交于 2019-11-29 03:47:44
问题 I have to retrieve the rule associated to a coupon code in order to display in quote the discount percentage of that rule. the simplest way is to calculate directly from quote amounts, but i want to retrieve directly the rule and then get the discount percentage from it. this is what i tried: $rule = Mage::getModel('salesrule/coupon'); $rule->load($couponCode); by this way i still havent retrieved rules attributes. any help? thanks. 回答1: To load a coupon by code, pass 'code' as 2nd param to

Update products programmatically in Magento

怎甘沉沦 提交于 2019-11-28 18:26:13
I'm working on a script that will create or update products in my catalog. The script works fine when the product needs to be created, but it fails when the product already exists in the database giving me (many times) the following messages : 2011-09-30T08:00:53+00:00 ERR (3): Recoverable Error: Argument 3 passed to Mage_Catalog_Model_Resource_Eav_Mysql4_Abstract::_canUpdateAttribute() must be an array, null given, called in ... 2011-09-30T08:00:53+00:00 ERR (3): Recoverable Error: Argument 3 passed to Mage_Eav_Model_Entity_Abstract::_canUpdateAttribute() must be an array, null given, called

Service Temporarily Unavailable Magento?

邮差的信 提交于 2019-11-28 15:15:35
My application was working fine yesterday. I started my PC today. When I tried to start Magento I got this error message. Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. I am not even able to open the admin page or see any sort of errors on the page. If I visit any URL of my Magento site I am getting the above output. How do I resolve this? elMarquis Check if there is a file called maintenance.flag and if so delete it . Magento 1.x : maintenance.flag file is in : magento root