talkingimage
Forum Replies Created
-
Also sugges any one of your plugin for bulk uploading or bulk entry of products in woocommerce.
Chat gpt is suggest this
Add a Custom Discount % Field + Auto-Calculate (Advanced – Recommended for You)
Since you manage DB + WooCommerce directly, this is better long-term. Step 1 — Create a Custom Product Field
Add a custom meta field:
_discount_percentage
You can:
- Add via ACF
- Or add directly in database
- Or via code
Step 2 — Auto Calculate Sale Price from Regular Price
Add this in your
functions.php:add_action(‘save_post_product’, ‘auto_calculate_sale_price_from_discount’, 20, 3);
function auto_calculate_sale_price_from_discount($post_id, $post, $update) {if (defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE) return;
$regular_price = get_post_meta($post_id, ‘_regular_price’, true);
$discount = get_post_meta($post_id, ‘_discount_percentage’, true);if ($regular_price && $discount) {
$sale_price = $regular_price – ($regular_price * ($discount / 100));
update_post_meta($post_id, ‘_sale_price’, $sale_price);
update_post_meta($post_id, ‘_price’, $sale_price);
}
} What This DoesIf:
Regular Price = 100
Discount % = 20It auto sets:
Sale Price = 80
Now inside Bulky:
- Add
_discount_percentagecolumn - Enter 10, 15, 20 etc.
- Save
- Sale price auto updates
This gives you Excel-style control.
We are using Table Shortcodes on each WooCommerce category page, with a separate shortcode for each category. Please provide a solution to remove the default product listings so that only the product tables are displayed.
Example: https://www.industrialmarket.in/product-category/hand-tools/ — this page shows the product table as intended, but also displays the default WooCommerce products in columns below it, which we want to hide.We cannot hide below woocoommerce products through css, as we want to show the woocoommerce products on search page.
Please reply as soon as possible. We are waiting to purchase the plugin once this issue is resolved.