product

Add shortened description under the product title in WooCommerce archive pages

谁都会走 提交于 2019-12-03 17:31:28
In Woocommerce archives pages, I should need to display couple of lines from the product description under each product title like it's shown in this image. How can I do that? Updated: This custom function will shorten the product description (to a defined amount of words) and will display it under the title of each product in archive pages as shop: add_action('woocommerce_after_shop_loop_item_title', 'description_in_shop_loop_item', 3 ); function description_in_shop_loop_item() { global $product; // HERE define the number of words $limit = 10; $description = $product->get_description(); //

add additional button on product page for woocommerce

我们两清 提交于 2019-12-03 17:24:24
I have spent the majority of the day trying to figure out how to adjust the single product page using woocommerce. I would like to add a custom button next to the "Add to cart" button that would be a custom link that says "Next". I am working on an invitation website where there are numerous components to an invitation, so after a user adds a product to their cart, I want there to be an option that says "Next" so they can go ahead and customize the next piece of the invitation. (I will have custom fields for each). The next button won't be on all products, and the link will be different for

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

筅森魡賤 提交于 2019-12-03 17:15:21
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. Peter Mundane there is a servie for ASIN Short URLs called asin.info. You can easily generate your URLs by Amazonlink or with this syntax: http://asin.info/a/{asincode} It will redirect the user to the product for the

Magento get all products

别等时光非礼了梦想. 提交于 2019-12-03 12:13:09
问题 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:

Testers in Software Development [closed]

与世无争的帅哥 提交于 2019-12-03 12:11:27
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . 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,

Using Magento API to get Products

自闭症网瘾萝莉.ら 提交于 2019-12-03 09:12:55
问题 I'm using the Magento API to get product data for products from a certain category from another domain. I have made the API call etc... The code I'm currently using to get the product data looks like this: $productList = $client->call($session, 'catalog_category.assignedProducts', 7); foreach ($productList as $product){ $theProduct = array(); $theProduct['info'] = $client->call($session, 'catalog_product.info', $product['sku']); $allProducts[] = $theProduct; } The code works fine, but it goes

How to list all products with total sales?

不羁的心 提交于 2019-12-03 08:58:05
How to list all products from WooCommerce with total sales? This code is just for 1 product only. It's not work if put an array on $product. <?php $product = "13"; $units_sold = get_post_meta( $product, 'total_sales', true ); echo '<p>' . sprintf( __( 'Units Sold: %s', 'woocommerce' ), $units_sold ) . '</p>'; ?> I want on output, format will be like this: [PRODUCT_NAME] - [TOTAL_SALES] Try this code. It'll give you output in 2 format <?php global $wpdb; $results = $wpdb->get_results("SELECT p.post_title as product, pm.meta_value as total_sales FROM {$wpdb->posts} AS p LEFT JOIN {$wpdb-

Magento BestSeller Module - Summing Configurable Products And Adding Them Back In

最后都变了- 提交于 2019-12-03 08:48:48
This has been bugging me for quite a while. Basically, what we are trying to achieve is in the bestsellers on our front page, to have the products listed in the amount sold. For simple products this works fine, however for configurable products they will be displayed as a quantity ordered of 0. I somehow need to find a way to get the configurable products, find the simple products attached to them, sum the amount sold of these simple products, add this back to the configurable products ID and feed this information back in so it will list the configurable product with the right amount that has

Disable original image crop in WooCommerce

妖精的绣舞 提交于 2019-12-03 07:50:48
How to disable original image crop in woocommerce? Because I have a problem with cropping WooCommerce process: Original Image Cropped Image: How can I fix this problem, to have like in original image, no cropping for resized thumbnails by WooCommerce? Go to woocommerce > settings > products (tab) > Display (sub-tab) Then at the bottom of the page, in "Product Images, disable Hard Crop options and save changes : Then you will need to regenerate your products images with Regenerate Thumbnails plugin : Install and activate Regenerate Thumbnails plugin . Going In Tools menu you will find a

Magento: Get product price given a customer group

假如想象 提交于 2019-12-03 07:17:17
问题 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 回答1: 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