product

Get Simple Product from Configurable in Cart

与世无争的帅哥 提交于 2019-12-03 06:15:31
I'm trying to load the simple products that have been added to a customer's cart, but when I retrieve the items, it's showing the parent configurable. $cart = Mage::getSingleton('checkout/cart'); $productIds = array(); foreach ($cart->getQuote()->getAllVisibleItems() as $item) { $productIds[] = $item->getProduct()->getId(); } var_dump($productIds); For instance, this will return all the same configurable id when I've added a small, medium, and large to my cart. How can I get the individual simple products? I'm trying to retrieve an attribute value that's set on the simple product level. After

How to Design a generic business entity and still be OO?

假装没事ソ 提交于 2019-12-03 05:51:29
问题 I am working on a packaged product that is supposed to cater to multiple clients with varying requirements (to a certain degree) and as such should be built in a manner to be flexible enough to be customizable by each specific client. The kind of customization we are talking about here is that different client's may have differing attributes for some of the key business objects. Also, they could have differing business logic tied in with their additional attributes as well As an very

How to get a category listing from Magento?

限于喜欢 提交于 2019-12-03 04:33:08
问题 I want to create a page in Magento that shows a visual representation of the categories.. example CATEGORY product 1 product 2 ANOTHER CATEGORY product 3 My problem is, their database is organised very differently to what I've seen in the past. They have tables dedicated to data types like varchar, int, etc. I assume this is for performance or similar. I haven't found a way to use MySQL to query the database and get a list of categories. I'd then like to match these categories to products, to

Magento get all products

佐手、 提交于 2019-12-03 03:27:49
I am trying to get the entire magento product collection, without any filters or restrictions, but I fail to get all products. I've tried various methods already, but they all give me a very limited selection of products. Let's say the store contains 5000 products, but it only shows 500. When I check the catalog -> products is does show me the entire list. Mage::getModel('catalog/product')->getCollection(); Mage::getResourceModel('catalog/product_collection')->addAttributeToSelect('*'); Mage::getModel("catalog/product")->getResourceCollection()->load(); All of them return the same amount (500)

Testers in Software Development [closed]

喜欢而已 提交于 2019-12-03 02:44:18
In my company we develop a software product. Until now we haven't had any testers, so basically the developers were the testers, and of course the customer and users (not good). Our team now consists of 4 developers and we work mainly with Cruisecontrol, Flex, ASP.NET, IIS, MSSQLServer and WebORB. I am urging the managers to hire a tester but I wonder if testers are normal in software development. So: Are testers necessary in product (or large scale project) development? Should testers only do test work? Or can you expect from a developer or graphical designer to test half of the week? Where

Conditionally set cart item prices for specific products in WooCommerce 3

戏子无情 提交于 2019-12-02 22:22:13
问题 In WooCommerce I am using some code from this answer: Set WooCommerce cart item price to zero if the product has already been bought It works great with one product, but I would like to make it work with several products . So the code below, for a specific product, change the cart item price to $0.00 if customer has already purchased and if not the price is set to $100 (for the first purchase) : add_action( 'woocommerce_before_calculate_totals', 'conditionally_change_cart_items_price', 10, 1

Schema.org Product type has no property price?

…衆ロ難τιáo~ 提交于 2019-12-02 21:31:27
问题 I have a webshop. On the product detail pages I use the Product type from schema.org: http://schema.org/Product It supports the properties name , description , image and url . However, it does not seem to support the inclusion of a "price" property, based on for example https://schema.org/price I find it weird that the Product definition does not seem to support a price. Or am I using the wrong type? 回答1: Yes, the price property is not defined for the Product type. You might want to use the

How to Design a generic business entity and still be OO?

我的未来我决定 提交于 2019-12-02 20:31:10
I am working on a packaged product that is supposed to cater to multiple clients with varying requirements (to a certain degree) and as such should be built in a manner to be flexible enough to be customizable by each specific client. The kind of customization we are talking about here is that different client's may have differing attributes for some of the key business objects. Also, they could have differing business logic tied in with their additional attributes as well As an very simplistic example: Consider "Automobile" to be a business entity in the system and as such has 4 key

Remove variation attribute drop downs in WooCommerce

£可爱£侵袭症+ 提交于 2019-12-02 20:09:04
问题 I am trying to remove the variations dropdown from a single product page, I have successfully removed the summary using... remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 20 ); But I have been unable to find a similar snippet to remove the dropdown. anyone have an example I can see? 回答1: To remove the product excerpt you should normally use woocommerce_template_single_excerpt (with a priority of 20 ) like: remove_action( 'woocommerce_single

Magento: Get product price given a customer group

女生的网名这么多〃 提交于 2019-12-02 19:50:26
On magento 1.7 I created a promotional price rule of 20% discount for "special members" customer group. I'd like to display both prices. I thought there would be something like $_product->getPriceByCustomerGroup( $groupId ); Goal (not logged in): Regular price: $10.99 Member price: $5.99 (member logged in): Regular price: $10.99 Member price: $5.99 Ok, bit of a muck around, but I think I have it. You can grab the price for the specific group id (3 in the case below) by calling setCustomerGroupId for the product. The only caveat is that once you call the setCustomerGroupId function you cannot