product

change custom product tab position in admin grid Magento

馋奶兔 提交于 2019-12-05 11:58:24
Hi i have added a new product tab in admin grid by following the below link http://inchoo.net/magento/how-to-add-custom-product-relations-in-magento/ Everything is working fine. BUt this has added the new tab at the last position in product edit section. Can you please suggest me how can i change the position of that tab. thanks You can use the action addTabAfter instead of addTab , then you have to specify the <after> parameter (categories, websites, upsell...). I edited the code of your tutorial for example: <reference name="product_tabs"> <action method="addTabAfter"> <name>custom</name>

How do display products by category in CMS page in Magento?

你说的曾经没有我的故事 提交于 2019-12-05 06:42:33
问题 i have one page with the name "products". in this page i need to display all the items seperated by it's corresponding category name. the structure looks like below category 1 item1 item2 category 2 item1 item2 how can i do this? 回答1: {{block type="catalog/product_list" category_id="8" template="catalog/product/featured.phtml"}} add above code in cms page and add featured.phtml file in catalog/product and put this code <?php $_productCollection=$this->getLoadedProductCollection() ?> <?php if(

What is Scalas Product.productIterator supposed to do?

萝らか妹 提交于 2019-12-05 03:27:04
Can someone tell me why I am getting different results when using Tuple2[List,List] and List[List] as my Product in the code below? Specifically I would like to know why the second value of the list of lists gets wrapped in another list? scala> val a = List(1,2,3) a: List[Int] = List(1, 2, 3) scala> val b = List(4,5,6) b: List[Int] = List(4, 5, 6) scala> val c = List(a,b) c: List[List[Int]] = List(List(1, 2, 3), List(4, 5, 6)) scala> c.productIterator.foreach( println(_) ) List(1, 2, 3) List(List(4, 5, 6)) // <-- Note this scala> val d = (a,b) d: (List[Int], List[Int]) = (List(1, 2, 3),List(4,

Editing Custom product tab content in Woocommerce Admin product pages

痴心易碎 提交于 2019-12-05 03:06:21
问题 In WooCommerce, I would like to add custom global product tab just like additional info when a new product is created. I am able to create new tab but cannot update anything on create new product page. I can see it on display page but how to add info through product edit page. I know I can use custom fields but I am looking to have it on product page to allow shop manager or others to fill this additional shipping tab. My Code is add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' )

WooCommerce - Getting completed status orders by user in a period of time

允我心安 提交于 2019-12-05 02:27:55
问题 I need to get a user's done purchases in the last month by USER ID in Woocommerce. Users have levels (Gold, Silver): Gold members can purchase 4 items each month; Silver members can buy 1 item per month. I need to check this before adding an item to the cart. I don't want to use a plugin for just this feature (which could not found, BTW). Is that possible? How can I achieve this? Thanks 回答1: It's possible to get the total items count bought by the current customer in the past 30 days . Here

Create Link with Amazon ASIN Number to link the right country (e.g. amazon.com, .co.uk, .jp) by usersettings?

陌路散爱 提交于 2019-12-05 02:24:16
问题 I have a database and want to link amazon products with their asin . For example B005UEF678 for iPhone 4S, would be amazon.com/dp/B005UEF678 in the US, but amazon.de/dp/B005UEF678 in germany. Actually I don't know which URL is the right, since the user could be from any country? How would you solve this problem? API? Switch Case in Userlanguage? thank you byt he way I use PHP. 回答1: there is a servie for ASIN Short URLs called asin.info. You can easily generate your URLs by Amazonlink or with

magento: Add product from front end

别说谁变了你拦得住时间么 提交于 2019-12-05 00:53:25
问题 Can anyone help me by some idea that how can I Add products from the front end with most of the attributes of the products in Magento? Thanks in Advance. 回答1: //$product = Mage::getModel('catalog/product'); $product = new Mage_Catalog_Model_Product(); //echo time(); // Build the product $product->setAttributeSetId(9);// #4 is for default $product->setTypeId('simple'); $product->setName('Some cool product name'); $product->setDescription('Full description here'); $product->setShortDescription(

How to display featured product in home page using magento?

99封情书 提交于 2019-12-05 00:02:13
问题 I want to add 'featured' attribute set while adding product (dropdown (yes/no)). On selecting 'yes' the respective products should be shown in home page. Is it possible ? 回答1: Please go through the below link to show the featured products in Magento Home page. http://www.magentocommerce.com/boards/viewthread/84852/ How Display Featured Products - Magentocommerce It would be helpful to you. 回答2: Adding featured products in Magento is very easy. Just follow the steps mentioned below. ->. Log in

How to get sum of products of all combinations in an array in Python? [closed]

与世无争的帅哥 提交于 2019-12-04 22:09:50
I'm using Python and I'm given an array like a = [1, 2, 3, 4] and I want to find sum of all possible combination multiplications like: For combinations of 1: 1 + 2 + 3 + 4 For combinations of 2: 1*2 + 2*3 + 3*4 + 4*1 . For combination of 3: 1*2*3 + 1*3*4 + 2*3*4 For combinations of 4: 1*2*3*4 And finally sum of all these sums is my answer. I'm using numpy.prod() and numpy.sum() . But it's still too slow. Is there some better algorithm to find the sum quickly? You can do with numpy and itertools : from numpy import linspace, prod from itertools import combinations arr = np.array([1,2,3,4]) [sum

how to display review form as well as reviews in a tab in product page [duplicate]

旧城冷巷雨未停 提交于 2019-12-04 21:43:01
Possible Duplicate: how to add review tab on product view page How to display review form as well as reviews in a tab in product page . I was doing the following in catalog.xml <!--action method="addTab" translate="title" module="catalog"><alias>review</alias><title>Review</title><block>review/product_view_list</block><template>review/product/view/list.phtml</template></action--> <!--For getting the review datails--> <action method="addTab" translate="title" module="catalog"><alias>review</alias><title>Review</title><block>review/form</block><template>review/form.phtml</template></action> <!-