magento

Magento 1.7 Override Pdf Classes

[亡魂溺海] 提交于 2020-01-17 10:21:29
问题 I tried to override Pdf classes for making changes toInvoice/Shipment/Creditmemo pdf but it doesnt seem to reflect. I created a module with following in the Mymodule/etc/config.xml <config> <modules> <Mymodule_Printtemplates> <version>0.1.0</version> </Mymodule_Printtemplates> </modules> <global> <models> <sales> <rewrite> <order_pdf_abstract>Mymodule_Printtemplates_Model_Order_Pdf_Abstract</order_pdf_abstract> <order_pdf_invoice>Mymodule_Printtemplates_Model_Order_Pdf_Invoice</order_pdf

Magento 2.1 Add To cart not working on multisite

萝らか妹 提交于 2020-01-17 08:03:18
问题 I have magento 2.1 installed and configured properly to work with 2 different domains using multi-site feature. Everything works fine, except Add to cart feature. Whenever I am adding something to cart on secondary websites, its not being added to cart. However I am getting message that 'Item added to cart' I checked cookie domain and tried everything, but it is not working Does anybody have any idea? 回答1: One of the Reason for product not add to cart if you have not Enable cache. If cache is

Magento - Create Unique Coupon Codes through code and mail it to the customer

 ̄綄美尐妖づ 提交于 2020-01-17 06:59:56
问题 I was wondering if there is a way through which one can create unique Discount Coupon codes every time through code or some script and mail it to different customers as per needed. Here's the script that I found over the net, public function generateRuleAction() { $rndId = crypt(uniqid(rand(),1)); $rndId = strip_tags(stripslashes($rndId)); $rndId = str_replace(array(".", "$"),"",$rndId); $rndId = strrev(str_replace("/","",$rndId)); if (!is_null($rndId)) { strtoupper(substr($rndId, 0, 5)); }

CTRL + Mouse click is not opening in new tab

落花浮王杯 提交于 2020-01-17 06:17:52
问题 we installed theme to our magento site..... in that theme, there is a feature, in listings page, there is a pagination. http://i.stack.imgur.com/TxA4E.png once we click on that pages[ CTRL + Mouse click] its opening in new tab. please scroll down fully last for below links. working but after we done lot of code chnages, now this feature is not working. not working is there any way we can find what is the problem. frontend/base/default/template/page/html/pager.html <?php if($this-

Magnento module file upload not working

萝らか妹 提交于 2020-01-17 06:09:10
问题 have a Magento module that takes an input and creates a new item off that input. Everything works fine, and I wanted to add a field that would input an image with the item. I made sure to add the corresponding database column, and made sure to make the change every where it would be needed, but when i upload an image through the new input the image field does not send in my post data. I still get an object with all the fields and values from my form but the File field is always omitted. Using

Magento : Item (Mage_Customer_Model_Customer) with the same id “####” already exist

落爺英雄遲暮 提交于 2020-01-17 04:40:07
问题 I have a issue here on Magento . When I tried to add a customer in Mangeto admin side it is giving error something like Item (Mage_Customer_Model_Customer) with the same id "14" already exist" I am adding customer with Store Id selected as Admin store. My Magento current version is 1.9.1 Please advise! 来源: https://stackoverflow.com/questions/29891015/magento-item-mage-customer-model-customer-with-the-same-id-already-ex

Magento Fatal error: Class 'Mage_Wsalogger_Helper_Data' not found in … /app/Mage.php on line 546

不羁的心 提交于 2020-01-17 04:30:28
问题 We were using webshopapps/wsalogger extension. It was working well. Suddenly it is doing problem on checkout page and it is giving error like: Fatal error: Class 'Mage_Wsalogger_Helper_Data' not found in /var/data/www/example.com/app/Mage.php on line 546 I disabled extension from etc module but it is still showing error. Is there any process so that I can skip this error on checkout page? 回答1: Magento looking for your extension's helper class and it couldn't find one. That is why it complains

How can i get the full path in local.xml file

本秂侑毒 提交于 2020-01-17 03:05:03
问题 Here is my code: <reference name="top.links"> <action method="removeLinkByUrl"><url>checkout/cart</url></action> </reference> Here how can i get full path of checkout/cart in <url></url> ? 回答1: If you want to remove that link from the header of the whole site, I would just copy the checkout.xml layout file to my custom theme directory to override it, and comment/delete the line where it is added: <reference name="top.links"> <block type="checkout/links" name="checkout_cart_link"> <!--<action

Magento Sort Categories Alphabetically

吃可爱长大的小学妹 提交于 2020-01-17 03:00:36
问题 recently I was asked to display top-level categories and its sub-categories on left navigation in alphabetical order. The code I'am using is <ul id="demo1" class="nav"> <?php $helper = Mage::helper('catalog/category') ?> <?php $categories = $helper->getStoreCategories(); ?> <?php foreach ($categories as $_category): ?> <?php echo $this->drawItem($_category) ?> <?php endforeach ?> </ul> Unfortunately it displays the categories but not alphabetically. Also is it not displaying because I am

Item names disappear on checkout in Magento

橙三吉。 提交于 2020-01-17 02:55:09
问题 I have a problem in my Magento site wherein an item in a cart of a registered customer doesn't get cleared after checking out. Thus I searched stackoverflow and found this solution: magento shopping cart does not get clear After implement it by adding this in my one page checkout phtml file, the item names and picture disappear. foreach( Mage::getSingleton('checkout/session')->getQuote()->getItemsCollection() as $item ){ Mage::getSingleton('checkout/cart')->removeItem( $item->getId() )->save(