Title: Syed Tarikul Islam's Replies | WordPress.org

---

# Syed Tarikul Islam

  [  ](https://wordpress.org/support/users/riko910/)

 *   [Profile](https://wordpress.org/support/users/riko910/)
 *   [Topics Started](https://wordpress.org/support/users/riko910/topics/)
 *   [Replies Created](https://wordpress.org/support/users/riko910/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/riko910/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/riko910/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/riko910/engagements/)
 *   [Favorites](https://wordpress.org/support/users/riko910/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/users/riko910/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/riko910/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Add to cart problem](https://wordpress.org/support/topic/add-to-cart-problem-20/)
 *  Thread Starter [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/add-to-cart-problem-20/#post-18169347)
 * Hi [@ckadenge](https://wordpress.org/support/users/ckadenge/) ,
   Okay thank you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Add to cart problem](https://wordpress.org/support/topic/add-to-cart-problem-20/)
 *  Thread Starter [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/add-to-cart-problem-20/#post-18168451)
 * Thank you for your suggestion, It’s worked.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] How do I display product unit price in woocommerce order mail](https://wordpress.org/support/topic/how-do-i-display-product-unit-price-in-woocommerce-order-mail/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/how-do-i-display-product-unit-price-in-woocommerce-order-mail/#post-18070836)
 * Hi, [@jai6358](https://wordpress.org/support/users/jai6358/)
 * To display the product unit price in WooCommerce order emails, you can achieve
   this by customizing the email template. WooCommerce uses hooks and templates 
   to generate emails, so you can modify the templates to display additional information
   like unit price.
 * Here’s how you can do it:Step 1: Create a Child Theme (if you haven’t already)
 * Always create a child theme for modifications, so your changes are preserved 
   during WooCommerce and theme updates.
    1. If you haven’t created a child theme, follow the steps here.
 * Step 2: Copy the Email Template
 * You need to modify the `email-order-items.php` template. Here’s how to find and
   copy the correct template:
    1. Navigate to the WooCommerce plugin directory:
       `/wp-content/plugins/woocommerce/
       templates/emails/`
    2. Copy the file `email-order-items.php` to your child theme at this location:
       `/
       wp-content/themes/your-child-theme/woocommerce/emails/`
 * Step 3: Modify the `email-order-items.php` Template
 * Now, you can modify the copied template to add a new column for the unit price.
    1. Open the copied `email-order-items.php` file in your child theme.
    2. Find the section that outputs the product information, usually within a table
       structure, where the subtotal is displayed.
    3. Add a new column to display the unit price.
 *     ```wp-block-code
       Here’s an example code modification:<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1">    <thead>        <tr>            <th class="td" scope="col"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>            <th class="td" scope="col"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>            <th class="td" scope="col"><?php esc_html_e( 'Unit Price', 'woocommerce' ); ?></th>            <th class="td" scope="col"><?php esc_html_e( 'Total', 'woocommerce' ); ?></th>        </tr>    </thead>    <tbody>        <?php        foreach ( $items as $item_id => $item ) {            $product = $item->get_product();            if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {                ?>                <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>">                    <td class="td" style="text-align:left; vertical-align:middle; word-wrap:break-word;"><?php                        echo wp_kses_post( $item->get_name() );                        // Show SKU, if enabled                        if ( $show_sku && is_object( $product ) && $product->get_sku() ) {                            echo ' (#' . $product->get_sku() . ')';                        }                        // allow other plugins to add additional product information here                        do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );                        wc_display_item_meta( $item );                        do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );                    ?></td>                    <td class="td" style="text-align:left; vertical-align:middle;"><?php echo esc_html( $item->get_quantity() ); ?></td>                    <td class="td" style="text-align:left; vertical-align:middle;"><?php echo wc_price( $item->get_total() / $item->get_quantity() ); ?></td>                    <td class="td" style="text-align:left; vertical-align:middle;"><?php echo $order->get_formatted_line_subtotal( $item ); ?></td>                </tr>                <?php            }        }        ?>    </tbody></table>
       ```
   
 * Step 4: Save and Test
 * After making these changes, save the file and test it by placing an order and
   checking the order confirmation email.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Product custom permalink problem](https://wordpress.org/support/topic/product-custom-permalink-problem/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years ago](https://wordpress.org/support/topic/product-custom-permalink-problem/#post-18043221)
 * Hi [@bangboke](https://wordpress.org/support/users/bangboke/) ,
 * Step 1: Customize WooCommerce Permalinks
    1. **Go to WordPress Dashboard**: Navigate to **Settings** > **Permalinks**.
    2. **Scroll to the WooCommerce section**: Under the **Product permalinks** section,
       you should see a field that allows you to customize the base for your product
       URLs.
    3. **Choose “Custom Base”**: In this section, you’ll see options like:
    4.  - Default: `/product/`
        - Shop base: `/shop/`
        - Shop base with category: `/shop/%product_cat%/`
        - Custom base: (This is what you need.)
    5. **Set the Custom Base**: Select the “Custom base” option and leave the field
       empty. If you leave it blank, WooCommerce will stop adding `/product/` before
       your products’ permalinks.Alternatively, you can set the custom base to `/%product_cat%/`
       to ensure that your product URLs follow this structure directly.
    6. **Save the Changes**: Click on **Save Changes** at the bottom of the page.
 * Step 2: Flush Permalinks
 * Sometimes, changes to permalink settings do not take effect immediately. To ensure
   the new structure is applied correctly:
    1. **Flush Permalinks**: After you’ve saved your custom permalink settings, WordPress
       should automatically flush the rewrite rules. However, if it doesn’t work right
       away, you can manually flush permalinks by:
    2.  - Going to **Settings** > **Permalinks**.
        - Clicking **Save Changes** again without making any modifications to force
          WordPress to regenerate the permalinks.
 * Thank you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Image size on “Short Description”](https://wordpress.org/support/topic/image-size-on-short-description/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years ago](https://wordpress.org/support/topic/image-size-on-short-description/#post-18043218)
 * Hi [@hadarhacohen](https://wordpress.org/support/users/hadarhacohen/) ,
   When 
   you set your image in a short description that time you can resize your image,
   that time you need to click this image and then resize it.Thank you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] All products category](https://wordpress.org/support/topic/all-products-category/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years ago](https://wordpress.org/support/topic/all-products-category/#post-18043213)
 * Hi [@komar132](https://wordpress.org/support/users/komar132/) ,
   Can you reform
   this,( function( wp ) {var el = wp.element.createElement;var InspectorControls
   = wp.blockEditor.InspectorControls;var PanelBody = wp.components.PanelBody;var
   SelectControl = wp.components.SelectControl;var useSelect = wp.data.useSelect;
   var Fragment = wp.element.Fragment;
 *     ```wp-block-code
       wp.hooks.addFilter(
           'blocks.registerBlockType',
           'my-plugin/extend-all-products',
           function( settings, name ) {
               if ( name === 'woocommerce/all-products' ) {
                   settings.attributes = Object.assign( settings.attributes, {
                       selectedCategory: {
                           type: 'string',
                           default: ''
                       }
                   });
   
                   var editFunction = settings.edit;
   
                   settings.edit = function( props ) {
                       if (props.name === 'woocommerce/all-products') {
                           var categories = useSelect( function( select ) {
                               return select( 'core' ).getEntityRecords( 'taxonomy', 'product_cat', { per_page: -1 } ) || [];
                           }, [] );
   
                           var categoryOptions = categories.map( function( cat ) {
                               return { label: cat.name, value: cat.id };
                           } );
                           categoryOptions.unshift({ label: 'Select category', value: '' });
   
                           return el(
                               Fragment,
                               {},
                               el( editFunction, props ),
                               el(
                                   InspectorControls,
                                   {},
                                   el(
                                       PanelBody,
                                       { title: 'Category Settings' },
                                       el(
                                           SelectControl,
                                           {
                                               label: 'Select Category',
                                               value: props.attributes.selectedCategory || '',
                                               options: categoryOptions,
                                               onChange: function( newValue ) {
                                                   props.setAttributes({ selectedCategory: newValue });
                                               }
                                           }
                                       )
                                   )
                               )
                           );
                       }
                       return el( editFunction, props );
                   };
   
                   settings.save = function() {
                       return null; // Gutenberg blocks usually return null for dynamic blocks.
                   };
               }
               return settings;
           }
       );
       ```
   
 * } )( window.wp );
 * class Utilities_Function_Kategorie {
 *     ```wp-block-code
       public function __construct() {
           add_action('enqueue_block_editor_assets', array($this, 'enqueue_category_filter_script'));
           add_filter('woocommerce_blocks_product_grid_query_args', array($this, 'filter_products_by_category'), 10, 2);
       }
   
       public function enqueue_category_filter_script() {
           wp_enqueue_script(
               'category-filter-block',
               plugins_url('category-filter.js', __FILE__),
               array('wp-blocks', 'wp-element', 'wp-components', 'wp-data', 'wp-editor'),
               filemtime(plugin_dir_path(__FILE__) . 'category-filter.js')
           );
       }
   
       public function filter_products_by_category($query_args, $attributes) {
           // Debugging logs
           error_log('Filtering products by category with attributes: ' . print_r($attributes, true));
   
           if (isset($attributes['selectedCategory']) && !empty($attributes['selectedCategory'])) {
               error_log('Selected category ID: ' . $attributes['selectedCategory']);
   
               // Ensure query is correctly updated
               $query_args['tax_query'][] = array(
                   'taxonomy' => 'product_cat',
                   'field'    => 'term_id', // Use 'term_id' instead of 'id' for taxonomy queries
                   'terms'    => array($attributes['selectedCategory']),
                   'operator' => 'IN',
               );
   
               error_log('Updated query_args with tax_query: ' . print_r($query_args, true));
           } else {
               error_log('No category selected or selectedCategory attribute is empty.');
           }
   
           return $query_args;
       }
       ```
   
 * }
 * new Utilities_Function_Kategorie();
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Css selector to style Add to Cart button block](https://wordpress.org/support/topic/css-selector-to-style-add-to-cart-button-block/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years ago](https://wordpress.org/support/topic/css-selector-to-style-add-to-cart-button-block/#post-18030489)
 * Hi [@hebhansen](https://wordpress.org/support/users/hebhansen/) ,
   You can use
   this formate in your custom CSS place – /* Default WooCommerce Add to Cart buttons*_/
   __.woocommerce a.button, __.woocommerce button.button, __.woocommerce input.button,
   __.woocommerce a.add\_to\_cart\_button { _background-color: #f5f5f5;color: #333;}
 * /* Apply your custom light button styles *_/ _
   _.my-light-button.woocommerce 
   a.button, __.my-light-button.woocommerce button.button, __.my-light-button.woocommerce
   input.button, __.my-light-button.woocommerce a.add\_to\_cart\_button { __background-
   color: #fff; __color: #000; _border: 1px solid #ddd;}
 * /* Hover effect for light buttons */
   .my-light-button.woocommerce a.button:hover,.
   my-light-button.woocommerce button.button:hover,.my-light-button.woocommerce 
   input.button:hover,.my-light-button.woocommerce a.add_to_cart_button:hover {background-
   color: #eaeaea;color: #111;}Thank you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] In Stock showing twice](https://wordpress.org/support/topic/in-stock-showing-twice-2/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years ago](https://wordpress.org/support/topic/in-stock-showing-twice-2/#post-18030408)
 * Hi [@pudpud](https://wordpress.org/support/users/pudpud/) ,
   I think it will not
   be compatible with plugins and themes. In this case, I think you need to deactivate
   the plugin one by one and check it.Thank you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Missing product image and SKU in admin >products >all products](https://wordpress.org/support/topic/missing-product-image-and-sku-in-admin-products-all-products/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years ago](https://wordpress.org/support/topic/missing-product-image-and-sku-in-admin-products-all-products/#post-18029278)
 * Hi [@osositno](https://wordpress.org/support/users/osositno/) ,
   Here I think 
   it has conflicted with plugins or WooCommerce customization. So, make sure that
   you use that plugin these are compatible with woocommerce.Thank you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Display the product attribute achive page](https://wordpress.org/support/topic/display-the-product-attribute-achive-page/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years ago](https://wordpress.org/support/topic/display-the-product-attribute-achive-page/#post-18026162)
 * Hi [@wpblogwriter](https://wordpress.org/support/users/wpblogwriter/),
   You are
   most welcome.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Display the product attribute achive page](https://wordpress.org/support/topic/display-the-product-attribute-achive-page/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years ago](https://wordpress.org/support/topic/display-the-product-attribute-achive-page/#post-18024261)
 * Hi, [@wpblogwriter](https://wordpress.org/support/users/wpblogwriter/)
 * I understand your issue, if you use this plugin then I think it will be solved.
   
   [https://wordpress.org/plugins/woo-variation-swatches/](https://wordpress.org/plugins/woo-variation-swatches/)
 * Thank you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Adding to cart process not finishing when error message shown](https://wordpress.org/support/topic/adding-to-cart-process-not-finishing-when-error-message-shown/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years ago](https://wordpress.org/support/topic/adding-to-cart-process-not-finishing-when-error-message-shown/#post-18024242)
 * Hi [@joelmellin](https://wordpress.org/support/users/joelmellin/) 
   I think this
   issue was created for your timer plugin. What can you deactivate it and then 
   check it?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] WooCommerce performance tips](https://wordpress.org/support/topic/woocommerce-performance-tips/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years ago](https://wordpress.org/support/topic/woocommerce-performance-tips/#post-18022921)
 * [@thecreator01](https://wordpress.org/support/users/thecreator01/) 
   You are most
   welcome.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] WooCommerce performance tips](https://wordpress.org/support/topic/woocommerce-performance-tips/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years ago](https://wordpress.org/support/topic/woocommerce-performance-tips/#post-18021800)
 * Hi, [@thecreator01](https://wordpress.org/support/users/thecreator01/)
 * **Disable Unnecessary WooCommerce Features:**
    1. **Disable WooCommerce Analytics**: WooCommerce’s built-in analytics can be resource-
       intensive. You can disable it if you use third-party analytics like Google Analytics.
    2.  - Go to **WooCommerce > Settings > Advanced > WooCommerce Analytics** and disable
          features you don’t need.
    3. **Disable Reviews**: If your store doesn’t need product reviews, turning this
       feature off can save some processing power.
    4.  - Go to **WooCommerce > Settings > Products > General** and uncheck “Enable
          product reviews.”
    5. **Disable Cart Fragments**: WooCommerce uses AJAX calls to update the cart without
       refreshing the page, but this can add overhead. Disable it if you don’t need
       a dynamic cart update.
    6.  - You can use a plugin like Disable Cart Fragments or add custom code.
    7. **Disable Unused Payment Gateways**: Having many payment gateways active can
       slow things down. Only enable the ones you actually use.
    8.  - Go to **WooCommerce > Settings > Payments** and disable any unnecessary gateways.
 * **General Performance Suggestions:**
    1. **Caching**: Use a caching plugin like **W3 Total Cache** or **WP Super Cache**
       to reduce server load by serving cached pages to users.
    2. **Image Optimization**: Compress your images with plugins like **Smush** or **
       Imagify**. Make sure to use next-gen formats like WebP for better performance.
    3. **CDN**: Use a Content Delivery Network (CDN) like Cloudflare or KeyCDN to speed
       up content delivery globally.
    4. **Database Optimization**: Regularly optimize your WordPress database with plugins
       like **WP-Optimize** to remove unnecessary data such as post revisions, drafts,
       and transients.
    5. **Lazy Load Images**: Enable lazy loading for images to only load them as they
       come into view. This is often built into modern themes or you can use plugins
       like **Lazy Load by WP Rocket**.
    6. **Choose a Lightweight Theme**: Opt for a lightweight theme like **Astra** or**
       GeneratePress** that is optimized for speed and minimal load.
 * **Limit Plugins**: The more plugins you use, the heavier your site becomes. Only
   install essential plugins, and avoid ones with overlapping functionality.
   Thank
   you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Woocommerce Cart not updating properly](https://wordpress.org/support/topic/woocommerce-cart-not-updating-properly/)
 *  [Syed Tarikul Islam](https://wordpress.org/support/users/riko910/)
 * (@riko910)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/woocommerce-cart-not-updating-properly/#post-17996508)
 * Hi [@beseenweband](https://wordpress.org/support/users/beseenweband/) ,
 * Theme Conflict: Your theme might not be compatible with WooCommerce’s AJAX cart
   updating.
 * Outdated Template Files: WooCommerce templates within your theme might be outdated.
   Ensure that your theme files are up to date by navigating to: WooCommerce → Status
   → Templates
 * If you find outdated templates, you’ll need to either update the theme or manually
   update those WooCommerce template files.
   Thank you.

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/users/riko910/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/riko910/replies/page/2/?output_format=md)