product

how to display recently viewed products list on product details page - magento

余生颓废 提交于 2020-01-24 12:49:09
问题 I have used mobileshoppe theme for magento and trying to display recently viewed product list at product details page but some how its not working... Added code below at catalog.xml <catalog_product_view translate="label"> <reference name="content"> <block type="reports/product_viewed" name="product.recently.viewed" as="product_recently_viewed" template="reports/product_viewed.phtml"/> </reference> </catalog_product_view> and below code at app\design\frontend\default\mobileshoppe\template

Show WooCommerce product attributes in custom home and product category archives

主宰稳场 提交于 2020-01-24 12:30:13
问题 The below code that displays product attributes on product category archive pages and is based on "Display product attributes on specific Woocommerce product category archives page" answer thread. However, when I add that category on the homepage, It does not display the attributes. My code version: // Show Attributes on Product Category Page add_action('woocommerce_after_shop_loop_item','display_loop_product_attribute' ); function display_loop_product_attribute() { global $product; //

Flutter increment counter for a specific product?

£可爱£侵袭症+ 提交于 2020-01-24 00:17:32
问题 I'm doing an application in flutter that contains products, what I need to do is to be able to increase and obtain the key of the increased product to be stored, currently they are increasing all. I leave the image and my code, thanks for the help When press on add icon increment two counter product Widget _buildSearchResults() { return new ListView.builder( itemCount: _productSearchResult.length, itemBuilder: (context, i) { return new Card( child: Column( children: <Widget>[ ExpansionTile(

How to check which coupon is applied to which product in WooCommerce?

爱⌒轻易说出口 提交于 2020-01-23 13:23:10
问题 Since we can apply different coupons to each product in an order, Is there any method to know which coupon is applied to which product? I've used $order->get_used_coupons() function but it just returns the used coupon codes only. Please help with a solution. Thanks. 回答1: Example made for Woocommerce 2.5.x on June 2016 (Will not work in Woocommerce 3+) This example is based on compiled searches: function wc_my_order_coupons( $order_id ) { $order = new WC_Order( $order_id ); // checking if

Add a custom meta field value after the price on single products pages

吃可爱长大的小学妹 提交于 2020-01-23 11:40:11
问题 I have created a custom Metabox named "Info" on my product pages. I would like to show the corresponding meta field value in the template content-single-product.php behind the product price. But it doesn't output the corresponding meta field value and this is not working. My problem is that I don't know how I can call the corresponding meta field value. Is it in function.php php file or in content-single-product.php template. This is the code that I use to create the Metabox (and it works) :

Add a custom meta field value after the price on single products pages

点点圈 提交于 2020-01-23 11:39:47
问题 I have created a custom Metabox named "Info" on my product pages. I would like to show the corresponding meta field value in the template content-single-product.php behind the product price. But it doesn't output the corresponding meta field value and this is not working. My problem is that I don't know how I can call the corresponding meta field value. Is it in function.php php file or in content-single-product.php template. This is the code that I use to create the Metabox (and it works) :

Adding custom settings tab for simple products in Woocommerce

会有一股神秘感。 提交于 2020-01-21 18:54:40
问题 I am having a problem trying to add a custom field called Discount_info to a simple product. I have created a new tab called discount_info which shows up in the simple product view just fine. Problem is trying to add a custom number field to this tab. I'm using the code below which is causing a 500 error. Any ideas where i am going wrong? // Display Fields using WooCommerce Action Hook add_action( 'woocommerce_product_options_discount_info', 'woocom_general_product_data_custom_field' );

Add a filter dropdown for product tags in woocommerce admin product list

你离开我真会死。 提交于 2020-01-21 14:55:13
问题 I want to also add a filter tag next to the filter by category in the woocommerce products page. Below image is in ducth but I want to add another dropdown menu if possible. 回答1: Try the following that will add filtering for product tags in admin product list: add_action('restrict_manage_posts', 'product_tags_sorting'); function product_tags_sorting() { global $typenow; $taxonomy = 'product_tag'; if ( $typenow == 'product' ) { $selected = isset($_GET[$taxonomy]) ? $_GET[$taxonomy] : ''; $info

Add Text under Single Product Short Description in Woocommerce

我的梦境 提交于 2020-01-20 07:09:50
问题 I want to add some Global Text immediately under the Product Short Description in Woo Commerce, before the product options. I can change the file directly, but of course as soon as it updates it gets over written. Is there another way of doing this? 回答1: Update 2: There is 3 different ways, using hooks: 1) Adding your custom text at the end of the short description content, (not for variable products ): add_filter( 'woocommerce_short_description', 'add_text_after_excerpt_single_product', 20,

Add Text under Single Product Short Description in Woocommerce

≯℡__Kan透↙ 提交于 2020-01-20 07:09:17
问题 I want to add some Global Text immediately under the Product Short Description in Woo Commerce, before the product options. I can change the file directly, but of course as soon as it updates it gets over written. Is there another way of doing this? 回答1: Update 2: There is 3 different ways, using hooks: 1) Adding your custom text at the end of the short description content, (not for variable products ): add_filter( 'woocommerce_short_description', 'add_text_after_excerpt_single_product', 20,