magento-1.6

getimagesize causing php error in magento

£可爱£侵袭症+ 提交于 2019-12-13 07:56:09
问题 So I'm trying to use getimagesize() to work out the aspect ratio of some images and size them accordingly, but it's producing an error in magento. Here is my code: <? $brand_image_url = $mediaURL . 'catalog/category/' . $_subcategory->load($id)->getBrandLogo(); $brand_image_size = getimagesize($brand_image_url); $brand_image_ratio = $brand_image_size[0]/$brand_image_size[1]; if($brand_image_ratio<100/48){ ?> <img src="<?php echo $mediaURL; ?>catalog/category/<?php echo $_subcategory->load($id

Magento product and category pages return magento 404

痞子三分冷 提交于 2019-12-13 05:34:06
问题 After upgrading my magento system from version 1.4.1 to 1.6.2 my categorie pages and product pages return the magento 404 error. products do show up on my homepage product lists but i can't get to their detail page because they also return a 404. Any suggestions? My cache is currently disabled for development. 来源: https://stackoverflow.com/questions/9875296/magento-product-and-category-pages-return-magento-404

Problems with Magento prices after included tax class to product

可紊 提交于 2019-12-13 04:36:45
问题 I used an option to add 21% tax to all products and for some reason some prices now came up as ± 1 cent, e.g.: http://vinylshop.lt/dj-3/patefonai-priedai/dj-patefonu-adatos/ortofon-concorde-pro-s-adata.html http://vinylshop.lt/dj-3/patefonai-priedai/dj-patefonu-adatos/stanton-trackmaster-v3-mp4-2-adatos.html In admin - showing OK, but in frontend - NOT. Have you ever encountered an issue like this? How can this be fixed? My Magento version 1.6.2 回答1: this is the famous magento rounding bug:

Add new field in bundle item option in admin section

做~自己de王妃 提交于 2019-12-12 01:39:58
问题 I am new bie in magento.I am creating a bundle product from admin section .when I add the bundle item there is only the title field for information but I need to add one more field for the description like I created a bundle item for computers but I need to show description about it . Please help .my requirement is to add new field for description along with the title in bundle item option. any help will be appreciated . 回答1: you can add extra field to magento bundle products by editing app

Display specific category products on no results search page

此生再无相见时 提交于 2019-12-12 00:45:26
问题 When we search for a wrong keyword like "sdfsdf" in magento site, it displays that "your search returns no results". Here I want to display any category products like "similar products" category as we display "best sellers" on home page. I have tried by calling the block in the catalogsearch.xml. BUt catalogsearch.xml doent contain any block for no results. So how can I display any category products on no results page. I have an idea like can we display a specific category products on .phtml

Magento pagination products

*爱你&永不变心* 提交于 2019-12-11 18:41:13
问题 I have a problem with Magento pagination. The prudct list page i call by my XML is: <block type="catalog/product_list" name="categorieen" as="categorieen" translate="label" template="page/html/categorieen.phtml"> <label>Categorieën</label> </block> The code of my product list page is: <div id="products"> <?php $_productCollection=$this->getLoadedProductCollection();?> <?php // Grid Mode ?> <?php $_collectionSize = $_productCollection->count() ?> <?php $_columnCount = $this->getColumnCount();

How to the installer after package data has been created - Magento

拥有回忆 提交于 2019-12-11 13:34:23
问题 I followed this tutorial and was able to create the package data successfully as shown in the screenshot. Now I have below three file in the var/connect folder. Myname_Mygateway-1.0.0.tgz, Myname_Mygateway.xml, package.xml as shown below. I tried to zip all the files and make a installer but It does not work when I tried to install in another magento site. How to the installer after package data has been created ? 回答1: You don't need to zip anything. The file with extension .tgz is only

Setting canonical tags for categories in Magento

旧街凉风 提交于 2019-12-11 06:28:42
问题 Is this possible, or is there some code that can be added so I can set a different canonical URL for categories in Magento? I can set for products fine. 回答1: Out of the box there is nothing for this that I am aware of. You will need to develop or build your own method of doing this. You will need to create an entry in a layout.xml file to put an additional template in the head section of the page when you are on a category page (this would likely be in a catalog_Category_view block). You

Integrity constraint violation: 1052 Column 'position' in order clause is ambiguous

空扰寡人 提交于 2019-12-11 02:03:11
问题 One of my users sent me this link from our own magento website. And we have this exception, any idea how can I fix this? http://www.theprinterdepox.com/catalogsearch/result/index/?cat=100&q=1022&x=0&y=0 There has been an error processing your request SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'position' in order clause is ambiguous Trace: #0 /home/theprint/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) #1 /home/theprint/public

Magento get which layout being used on phtml files

喜你入骨 提交于 2019-12-10 17:11:19
问题 Is there a way I could get which layout being used on a certain phtml files? Here in my case, I want to check what layout being used on catalog/list.phtml, I used that information to make conditional "if" on the product image grid size. I've tried to google it out. But all the result is just explaining about xml layout things. The closest clue I got is this thread Magento get layout for given page which stated the use of this snippet $left_block = $this->loadLayout()->getLayout()->getBlock(