magento-1.7

Using column aliases in Sales Order Grid field

瘦欲@ 提交于 2019-12-12 09:16:37
问题 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

Magento - Fatal error: Call to a member function getBackend() on a non-object in app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816

柔情痞子 提交于 2019-12-12 08:36:09
问题 Getting this error when trying to use a custom filter inside a custom theme. I have set up the new attribute "is_featured" and its in an attribute set. I made a product that assigned it as featured (yes/no choice) My home page (in the CMS section) is including the following "panel" <block type="catalog/product" name="catalog.product_featured_list" template="catalog/product/featured_list.phtml" after="-"/> featured_list.phtml looks like this: <?php $storeId = Mage::app()->getStore()->getId();

zend_pdf document issue in windows 7

青春壹個敷衍的年華 提交于 2019-12-12 06:27:49
问题 I am using zend_pdf to generate pdf in magento 1.7 and I have tried something like public function getpdf() { $pdf = new Zend_Pdf(); $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA); $page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4); $page->setFont($font, 24) ->drawText('Hello World', 72, 720); $pdf->pages[] = $page; $pdfString = $pdf->render(); header("Content-Disposition: attachment; filename=helloworld.pdf"); header("Content-type: application/x-pdf"); echo $pdfString; }

Magento : get attribute value php

独自空忆成欢 提交于 2019-12-12 04:59:54
问题 i have tow attributes described in the image bellow : i wanna know how to get value of it ________ _________ _________ Thanks ! 回答1: First load the product model: $product = Mage::getModel('catalog/product')->load(<product_id>); then use: $allowCustomPrice = $product->getAttributeText('allow_custom_price'); and $minPrice = $product->getMinPrice(); Note: I am asuming, that you will replace with original product id, and attribute codes are "allow_custom_price" and "min_price" respectively. 来源:

Products are not bein saved (anythin else is): keeps loading/processing

∥☆過路亽.° 提交于 2019-12-12 04:49:25
问题 Unitll this morning I have experienced zero troubles while saving products in Magento. But, since an hour or 2, my products are just not being saved. Magento keeps loading (a popup stays with ‘Please wait’) and my product is never saved. With firebug, I found that the transaction is aborted. I used fiddler to trace the request, and got this: HTTP/1.1 504 Fiddler - Receive Failure Content-Type: text/html; charset=UTF-8 Connection: close “ReadResponse() failed: The server did not return a

Magento Cronjob for updating stock

隐身守侯 提交于 2019-12-12 04:18:31
问题 after a long search I've finally decided to ask: I need a Cronjob for magento that updates the product attribute " stock " in "on stock" once a day. Is there a possibility to catch this attribute and change it with a cronjob? Thank you 回答1: I am creating a custom extension for that ,please use this Cron is run every 15 min. Please create config.xml under app/code/local/Amit/CustomStockUpdate/etc/ <?xml version="1.0"?> <config> <modules> <Amit_CustomStockUpdate> <version>0.1.0</version> </Amit

Magento - Override the tablerate resource model

半城伤御伤魂 提交于 2019-12-12 04:13:07
问题 I have read through the various threads on here however i can still not get the following problem resolved. I am attempting to override a resource Model using the method below, however i am having no luck at all. Magento Version: 1.7 I would like to rewrite the the Mage_Shipping_Model_Resource_Carrier_Tablerate class found at: app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate I have copied the file too: app/code/local/me/Shipping/Model/Resource/Carrier/Tablerate.php and renamed the

Magento: Display disabled products on frontend [closed]

前提是你 提交于 2019-12-12 04:06:29
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I want to show disabled products on front end. But how can I do it?? Although I don't want them to be appeared in catalog or search, but I do want them to be appeared when accessed by direct url saying "Product is Disabled". Right now view.phtml in catalog/product is not

Magento: Displaying all categories but cannot get associating images

纵然是瞬间 提交于 2019-12-12 03:36:09
问题 I am having a odd but probably easily solvable situation. I have the following code in a block: <div class="home-categories"> <?php $_helper = Mage::helper('catalog/category') ?> <?php $_categories = $_helper->getStoreCategories() ?> <?php foreach($_categories as $_category): ?> <a href="<?php echo $_helper->getCategoryUrl($_category) ?>"> <img src="<?php echo $_category->getStoreIds(); ?>"/> <div class="category-title"> <p><?php echo $_category->getName(); ?></p> </div> </a> <?php endforeach

redirecting from admin page to a postAction on frontend

微笑、不失礼 提交于 2019-12-12 02:37:14
问题 Edited code: now I'm not receiving the 404 Error but on the other hand there is nothing added on the database or on exception logs. I need to call from my model php file a postAction function on a third part module (VideoTestimonials from aheadWorks) in order to reuse all their code to get the needed functionalities and avoid future bugs if I just copied the code and modified at will. On a previous question I was pointed on the, I guess, right direction to accomplish this goal by using