product

add additional button on product page for woocommerce

旧巷老猫 提交于 2019-12-21 05:31:15
问题 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

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

纵饮孤独 提交于 2019-12-21 02:53:16
问题 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

Alpha, Beta, Snapshot, Release, Nightly, Milestone, Release Candidate(RC)… When to use which terminology

巧了我就是萌 提交于 2019-12-20 21:54:14
问题 As a build, release and deployment engineer, there are multiple types of releases as below: Alpha Beta Snapshot Release Nightly Milestone Release Candidate(RC) [Anything else] Would like to know the difference between them and the significance. 回答1: Alpha The alpha phase of the release life cycle is the first phase to begin software testing (alpha is the first letter of the Greek alphabet, used as the number 1). In this phase, developers generally test the software using white-box techniques.

Replace Price Difference with Actual Price in Magento Configurable Product Options

有些话、适合烂在心里 提交于 2019-12-20 17:36:34
问题 I have a configurable product with 3 options, see below: I want to replace the +£24.00 and the +£75.00 with the actual prices of the products. So instead it would say: £69.00 and £120.00 I have located the code being in js/varien/product.js I've spent a bit of time chopping and changing the code, but can't quite decipher what needs to change. Line 240 downwards in this file handles the JavaScript events for configurable products. I'd appreciate any help here. 回答1: This is performed by

Magento programmatically remove product images

♀尐吖头ヾ 提交于 2019-12-20 08:40:07
问题 This must be a such a simple programming task that I absolutely cannot find any information about it on the net. Basically, I'm trying to DELETE product images. I want to delete all images from a product's media gallery. Can I do this without wading through a million lines of code for such a simple task? Please note that I've already tried this: $attributes = $product->getTypeInstance()->getSetAttributes(); if (isset($attributes['media_gallery'])) { $gallery = $attributes['media_gallery'];

What is the difference between isSaleable() and isAvailable()?

自古美人都是妖i 提交于 2019-12-20 08:35:14
问题 I'm working on the display of the stock availability on the (individual) product page of my Magento theme, and there's something I don't completely understand about this. I see two methods being used in the templates to check whether a product is available for sale: Mage_Catalog_Model_Product::isAvailable() Mage_Catalog_Model_Product::isSaleable() My own findings: I see that isSalable() (which in turn is called by isSaleable() ) calls isAvailable() but also dispatches two events ( catalog

Order by custom Woocommerce product sorting in a WP_Query

心不动则不痛 提交于 2019-12-20 03:49:13
问题 I have created a shortcode to display products by category with the query below: $atts = shortcode_atts( array ( 'type' => 'product', 'posts' => -1, 'category' => '', ), $atts, 'list_products' ); $query = new WP_Query( array( 'post_type' => $atts['type'], 'posts_per_page' => $atts['posts'], 'tax_query' => array( array( 'taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => $atts['category'], ) ), ) ); This is all fine, however I am trying to use the order by attribute when I sort the

Limit posts on a WP_Query and in WooCommerce product query

折月煮酒 提交于 2019-12-20 03:38:07
问题 In Woocommerce, I need to limit post with a wp_query . I know how to limit post in wp_query For example if this page id is 20, I am running the query: function wpcodex_filter_main_search_post_limits( $limit, $query ) { if ( get_the_ID()==20 ) { return 'LIMIT 0, 12'; } return $limit; } add_filter( 'post_limits', 'wpcodex_filter_main_search_post_limits', 10, 2 ); But I need to set the limt as 25 to 35. How to do this? Even if I am placing return 'LIMIT 25, 35'; it is still showing first 35

Save product custom field radio button value in cart and display it on Cart page

老子叫甜甜 提交于 2019-12-20 01:43:47
问题 I have added some custom options on woocommerce single product page using the code below on my theme's functions.php: function options_on_single_product(){ ?> <input type="radio" name="option1" checked="checked" value="option1"> option 1 <br /> <input type="radio" name="option1" value="option2"> option 2 <?php } add_action("woocommerce_before_add_to_cart_button", "options_on_single_product"); Now i want to display the selected option value on cart page. Please help me to do this. Thanks 回答1:

Reorder and customize product dimensions formatted output in WooCommerce

谁说我不能喝 提交于 2019-12-19 10:50:45
问题 First of all, I would like to thank LoicTheAztec for the answer here. I'm looking for the very similar customization, but not 100% the same, what I want to achieve is: W x L x H mm Yes, with the unit of measurement at the end. Example : 200x600x200mm With the answer provided, I managed to get 200mmx600mmx200mm What to do if I would like to have the unit "mm" at the end only? Below is my version of edited code add_filter( 'woocommerce_format_dimensions', 'custom_formated_product_dimensions',