SELECT 
  cscart_products.*, 
  cscart_product_descriptions.*, 
  MIN(
    IF(
      cscart_product_prices.percentage_discount = 0, 
      cscart_product_prices.price, 
      cscart_product_prices.price - (
        cscart_product_prices.price * cscart_product_prices.percentage_discount
      )/ 100
    )
  ) as price, 
  GROUP_CONCAT(
    CASE WHEN (
      cscart_products_categories.link_type = 'M'
    ) THEN CONCAT(
      cscart_products_categories.category_id, 
      'M'
    ) ELSE cscart_products_categories.category_id END 
    ORDER BY 
      cscart_categories.storefront_id IN (0, 1) DESC, 
      (
        cscart_products_categories.link_type = 'M'
      ) DESC, 
      cscart_products_categories.category_position ASC, 
      cscart_products_categories.category_id ASC
  ) as category_ids, 
  popularity.total as popularity, 
  IF(
    shared_prices.product_id IS NOT NULL, 
    MIN(
      IF(
        shared_prices.percentage_discount = 0, 
        shared_prices.price, 
        shared_prices.price - (
          shared_prices.price * shared_prices.percentage_discount
        )/ 100
      )
    ), 
    MIN(
      IF(
        cscart_product_prices.percentage_discount = 0, 
        cscart_product_prices.price, 
        cscart_product_prices.price - (
          cscart_product_prices.price * cscart_product_prices.percentage_discount
        )/ 100
      )
    )
  ) as price, 
  companies.company as company_name, 
  cscart_product_sales.amount as sales_amount, 
  cscart_seo_names.name as seo_name, 
  cscart_seo_names.path as seo_path, 
  cscart_discussion.type as discussion_type, 
  cscart_product_review_prepared_data.average_rating average_rating, 
  cscart_product_review_prepared_data.reviews_count product_reviews_count 
FROM 
  cscart_products 
  LEFT JOIN cscart_product_prices ON cscart_product_prices.product_id = cscart_products.product_id 
  AND cscart_product_prices.lower_limit = 1 
  AND cscart_product_prices.usergroup_id IN (0, 0, 1) 
  LEFT JOIN cscart_product_descriptions ON cscart_product_descriptions.product_id = cscart_products.product_id 
  AND cscart_product_descriptions.lang_code = 'en' 
  LEFT JOIN cscart_ult_product_prices shared_prices ON shared_prices.product_id = cscart_products.product_id 
  AND shared_prices.company_id = 1 
  AND shared_prices.lower_limit = 1 
  AND shared_prices.usergroup_id IN (0, 0, 1) 
  LEFT JOIN cscart_companies as companies ON companies.company_id = cscart_products.company_id 
  INNER JOIN cscart_products_categories ON cscart_products_categories.product_id = cscart_products.product_id 
  INNER JOIN cscart_categories ON cscart_categories.category_id = cscart_products_categories.category_id 
  AND cscart_categories.storefront_id IN (0, 1) 
  AND (
    cscart_categories.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_categories.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_categories.usergroup_ids
    )
  ) 
  AND (
    cscart_products.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_products.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_products.usergroup_ids
    )
  ) 
  AND cscart_categories.status IN ('A', 'H') 
  AND cscart_products.status IN ('A', 'H') 
  LEFT JOIN cscart_product_popularity as popularity ON popularity.product_id = cscart_products.product_id 
  LEFT JOIN cscart_product_sales ON cscart_product_sales.product_id = cscart_products.product_id 
  AND cscart_product_sales.category_id = 1 
  LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = 339 
  AND cscart_seo_names.type = 'p' 
  AND cscart_seo_names.dispatch = '' 
  AND cscart_seo_names.lang_code = 'en' 
  AND cscart_seo_names.company_id = 1 
  LEFT JOIN cscart_discussion ON cscart_discussion.object_id = cscart_products.product_id 
  AND cscart_discussion.object_type = 'P' 
  AND cscart_discussion.company_id = 1 
  LEFT JOIN cscart_product_review_prepared_data ON cscart_product_review_prepared_data.product_id = cscart_products.product_id 
  AND cscart_product_review_prepared_data.storefront_id = 0 
WHERE 
  cscart_products.product_id = 339 
  AND (
    companies.status IN ('A') 
    OR cscart_products.company_id = 0
  ) 
GROUP BY 
  cscart_products.product_id

Query time 0.00208

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "shared_prices",
      "access_type": "system",
      "possible_keys": [
        "usergroup",
        "product_id",
        "company_id",
        "lower_limit",
        "usergroup_id"
      ],
      "rows": 0,
      "filtered": 0,
      "const_row_not_found": true
    },
    "table": {
      "table_name": "cscart_products",
      "access_type": "const",
      "possible_keys": ["PRIMARY", "status"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["product_id"],
      "ref": ["const"],
      "rows": 1,
      "filtered": 100
    },
    "table": {
      "table_name": "companies",
      "access_type": "system",
      "possible_keys": ["PRIMARY"],
      "rows": 1,
      "filtered": 100
    },
    "table": {
      "table_name": "popularity",
      "access_type": "const",
      "possible_keys": ["PRIMARY", "total"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["product_id"],
      "ref": ["const"],
      "rows": 1,
      "filtered": 100
    },
    "table": {
      "table_name": "cscart_product_sales",
      "access_type": "const",
      "possible_keys": ["PRIMARY", "pa"],
      "key": "PRIMARY",
      "key_length": "6",
      "used_key_parts": ["category_id", "product_id"],
      "ref": ["const", "const"],
      "rows": 1,
      "filtered": 100
    },
    "table": {
      "table_name": "cscart_product_prices",
      "access_type": "range",
      "possible_keys": ["product_id"],
      "key": "product_id",
      "key_length": "9",
      "used_key_parts": ["product_id", "lower_limit", "usergroup_id"],
      "rows": 2,
      "filtered": 100,
      "attached_condition": "trigcond(1) and trigcond(cscart_product_prices.product_id = 339 and cscart_product_prices.lower_limit = 1 and cscart_product_prices.usergroup_id in (0,0,1))"
    },
    "table": {
      "table_name": "cscart_product_descriptions",
      "access_type": "const",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "9",
      "used_key_parts": ["product_id", "lang_code"],
      "ref": ["const", "const"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "trigcond(cscart_product_descriptions.lang_code = 'en')"
    },
    "table": {
      "table_name": "cscart_products_categories",
      "access_type": "ref",
      "possible_keys": ["PRIMARY", "pt"],
      "key": "pt",
      "key_length": "3",
      "used_key_parts": ["product_id"],
      "ref": ["const"],
      "rows": 43,
      "filtered": 100
    },
    "table": {
      "table_name": "cscart_categories",
      "access_type": "eq_ref",
      "possible_keys": ["PRIMARY", "c_status"],
      "key": "PRIMARY",
      "key_length": "3",
      "used_key_parts": ["category_id"],
      "ref": ["herbaria_cscart_4_18.cscart_products_categories.category_id"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "cscart_categories.storefront_id in (0,1) and (cscart_categories.usergroup_ids = '' or find_in_set(0,cscart_categories.usergroup_ids) or find_in_set(1,cscart_categories.usergroup_ids)) and cscart_categories.`status` in ('A','H')"
    },
    "table": {
      "table_name": "cscart_seo_names",
      "access_type": "const",
      "possible_keys": ["PRIMARY", "dispatch"],
      "key": "PRIMARY",
      "key_length": "210",
      "used_key_parts": [
        "object_id",
        "type",
        "dispatch",
        "lang_code",
        "company_id"
      ],
      "ref": ["const", "const", "const", "const", "const"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "trigcond(cscart_seo_names.`type` = 'p' and cscart_seo_names.dispatch = '' and cscart_seo_names.lang_code = 'en')"
    },
    "table": {
      "table_name": "cscart_discussion",
      "access_type": "const",
      "possible_keys": ["object_id", "idx_company_id"],
      "key": "object_id",
      "key_length": "10",
      "used_key_parts": ["object_id", "object_type", "company_id"],
      "ref": ["const", "const", "const"],
      "rows": 1,
      "filtered": 100,
      "attached_condition": "trigcond(cscart_discussion.object_type = 'P')"
    },
    "table": {
      "table_name": "cscart_product_review_prepared_data",
      "access_type": "const",
      "possible_keys": ["PRIMARY"],
      "key": "PRIMARY",
      "key_length": "7",
      "used_key_parts": ["product_id", "storefront_id"],
      "ref": ["const", "const"],
      "rows": 1,
      "filtered": 100
    }
  }
}

Result

product_id product_code product_type status list_price amount weight length width height shipping_freight low_avail_limit timestamp is_edp edp_shipping unlimited_download tracking free_shipping zero_price_action is_pbp is_op is_oper company_id is_returnable return_period avail_since localization min_qty max_qty qty_step list_qty_count tax_ids age_verification age_limit usergroup_ids options_type exceptions_type details_layout shipping_params out_of_stock_actions updated_timestamp facebook_obj_type parent_product_id cp_bar cp_seo_use_addon cp_seo_no_index cp_sr_variation_type cp_fake_product cp_not_crop_auto lang_code product shortname short_description full_description meta_keywords meta_description search_words page_title age_warning_message promo_text cp_contents price category_ids popularity company_name sales_amount seo_name seo_path discussion_type average_rating product_reviews_count
339 L-BIB V A 12.95 48620 8.600 0 0 0 0.00 0 1443502800 N N N B N R N N N 1 Y 10 0 0 0 0 0 7,8,9 N 0 0 S F default a:5:{s:16:"min_items_in_box";i:1;s:16:"max_items_in_box";i:80;s:10:"box_length";i:4;s:9:"box_width";i:4;s:10:"box_height";i:2;} N 1749671052 activity 5556 1.000 Y D M N N en Luffa (Loofah) Soaps on a Rope Welcome to an extraordinary shower. Luffa soap will quickly become your skins BFF. We’ve incorporated our moisturizing soap into whole natural luffas (also spelled loofah). The ones we use come directly to us from Egypt. Luffa aegyptiaca is a member of the Cucurbitaceae (gourd) family that includes squash, pumpkins and zucchini. When young and tender, sponge gourds are eaten. When mature, they are used for a natural scrub. You will see why luffas have been used for thousands of years. They have a perfect texture for the job: not too rough but just right. <p class="pquote">"I absolutely love the Luffa soap!!"</p> <p class="pquotedperson">Jenna Ottwell, Pleasanton, California</p> <p>&nbsp;</p> <p><strong>Unsurpassed Showers</strong></p> <p>We've combined our&nbsp;moisturizing soap with genuine <a href="https://www.herbariasoap.com/egyptian-luffa.html">Egyptian Luffa</a>&nbsp;to make the most fabulous shower soap ever.&nbsp;These extra-large rounds last and last.</p> <p>&nbsp;</p> <p><img src="https://herbariasoap.com/images/companies/1/MayChangLuffa475-80.jpg?1614376673557" alt="Luffa soap Loofah soap" width="475" height="475"></p> <p><strong>Gentle Scrub</strong></p> <p>Luffa Soaps have the perfect texture for invigorating showers&mdash;not too rough, not too smooth. Scrubbing with a Luffa Soap exfoliates (removes dead skin cells) and increases blood circulation, to leave skin healthy and glowing.</p> <p>&nbsp;</p> <p><img src="https://herbariasoap.com/images/companies/1/WebShotsLuffaGroupStacked.jpg?1712342932195" alt="Luffa Soaps Loofah Soaps" width="594" height="475"></p> <p><strong>Soap on a Rope</strong></p> <p>A hemp cord allows the bar to hang and dry out between uses.</p> <p><strong>Environmentally Conscious </strong></p> <p>They are wrapped in Biolefin packaging that is both biodegradable and compostable. We couldn't hide these stunning soaps in paper or a box.</p> <p><a href="/egyptian-luffa.html"><img src="https://www.herbariasoap.com/images/companies/1/AegypticaVsArctangula600-80.jpg?1564086484985" alt="Loofah Luffa aegyptaica vs. Luffa acutangula" width="600" height="510"></a></p> <p><strong>Horse of a Different Color</strong></p> <p>To make our Luffa Soaps, we use Egyptian luffas, <em>Luffa aegyptiaca</em>, on the left in the photo above. On the right is a different species, <em>L. acutangula,</em>&nbsp;that you'll often see in other luffa soaps. <em>L. acutangula&nbsp;</em>stays stiff even when wet and too scratchy for anything but your heels. Notice that the scientific name of the plant is spelled luffa. That's why we went with that spelling.&nbsp;&nbsp;</p> <p>&nbsp;</p> <p><strong>Fit for a King</strong></p> <p><img src="https://herbariasoap.com/images/companies/1/EgyptianLuffaColor-475-80.jpg?1646426422648" alt="Egyptian Luffa" width="475" height="458"></p> <p>We also offer&nbsp;<a href="https://www.herbariasoap.com/egyptian-luffa.html">whole luffas and pieces</a>.</p> <p>&nbsp;&nbsp;</p> <p><span style="font-size: 14pt;"><strong>Seven delightful varieties</strong></span></p> <p class="pquote">"Triple Mint and French Lavender are my faves. Everyone I gift these to become true believers! My favorite items to gift!"</p> <p class="pquotedperson">Ruth E. Kim from our Facebook page</p> <p><strong><img src="https://herbariasoap.com/images/companies/1/WebDianaBIBinhand.JPG?1712351764006" alt="Biotherapy Black Luffa Soap" width="460" height="368"><br></strong></p> <p><strong>Biotherapy Black</strong><strong>&trade; Luffa</strong> contains activated charcoal, which, by absorbing toxins, can help reduce the instances of acne and other skin problems. To balance your skin's oil production, it contains essential oils of <a href="http://www.herbariasoap.com/products-by-ingredient/essential-oils/tea-tree-soaps/">tea tree</a>, <a href="http://www.herbariasoap.com/products-by-ingredient/essential-oils/palmarosa-soaps/">palmarosa</a>, <a href="http://www.herbariasoap.com/products-by-ingredient/essential-oils/lavender-soaps/">lavender</a>, <a href="http://www.herbariasoap.com/products-by-ingredient/essential-oils/rose-geranium-soaps/">geranium</a>, <a href="http://www.herbariasoap.com/products-by-ingredient/essential-oils/patchouli-soaps/">patchouli</a>, and <a href="http://www.herbariasoap.com/products-by-ingredient/essential-oils/vetiver-soaps/">vetiver.</a> The bar is <a href="/faqs.html#i1">superfatted</a> with jojoba oil, a non-comedogenic moisturizer, which will soften your skin without clogging pores. Want the regular <a href="http://www.herbariasoap.com/biotherapy-black-soap.html">Biotherapy Black</a> bar or <a href="http://www.herbariasoap.com/biotherapy-skincare-soap.html">Biotherapy Skincare</a>?</p> <p>&nbsp;</p> <p><img src="https://herbariasoap.com/images/companies/1/WebCMPinhand.jpg?1712352283326" alt="Luffa Soap Camper's Choice Loofah Soap" width="460" height="368"></p> <p><strong>Camper's Choice&trade; Luffa, </strong>our insect repellent recipe, scrubs away chiggers and poison ivy, too. The bar contains essential oils of <a href="http://www.herbariasoap.com/citronella-soaps">citronella</a>, <a href="http://www.herbariasoap.com/lemongrass-soaps">lemongrass</a>, <a href="/lavender-soaps/">lavender</a>, <a href="http://www.herbariasoap.com/lemon-eucalyptus-soaps">lemon eucalyptus</a>, <a href="http://www.herbariasoap.com/sweet-basil-soaps">sweet basil</a>, <a href="http://www.herbariasoap.com/patchouli-soaps">patchouli</a>, <a href="http://www.herbariasoap.com/thyme-soaps">thyme</a>, <a href="http://www.herbariasoap.com/catnip-soaps">catnip.</a> It's <a href="/faqs.html#i1">superfatted</a> with <a href="http://www.herbariasoap.com/hemp-seed-oil-soaps-and-products">hemp seed oil</a>. <a href="http://www.herbariasoap.com/clay-soaps">French green clay</a> adds to the creamy lather. Want the regular <a title="Camper's Choice bar" href="http://www.herbariasoap.com/campers-choice-soap.html">Camper's Choice bar</a>?<span class="gmail_default"><br></span></p> <p>&nbsp;</p> <p><strong><img src="https://herbariasoap.com/images/companies/1/WebCHAIinhand.jpg?1712352493764" alt="Luffa Soap Chai Loofah Soap" width="460" height="368"></strong></p> <p><strong>Chai Spice Luffa</strong> will take you to Mumbai and back with this delightful blend of essential oils, including <a href="/cardomom-essential-oil/">cardamom</a>,<a href="/coriander-soaps/">&nbsp;coriander</a>,&nbsp;<a href="/cinnamon-leaf-soaps/">cinnamon</a>,&nbsp;<a href="/ginger-soaps/">ginger</a>, <a href="/peppercorn-soaps/">black peppercorn</a>, <a href="/nutmeg-soaps/">nutmeg,</a>&nbsp;and <a href="/vanilla-soaps/">vanilla</a> infusion. The bar contains <a href="shea-butter-soaps-and-products/">shea butter</a> to moisturize your skin, <a href="/clay-soaps/">kaolin clay</a> for extra creaminess, and&nbsp;<a href="https://www.herbariasoap.com/tea-soaps/">black tea</a> provides the color.</p> <p>&nbsp;</p> <p><strong><img src="https://herbariasoap.com/images/companies/1/WebFLinhand.jpg?1712352545162" alt="Luffa Soap French Lavender Loofah Soap" width="460" height="368"></strong></p> <p><strong>French Lavender Luffa</strong> contains everybody's favorite, essential oil of <a href="http://www.herbariasoap.com/lavender-soaps">lavender</a>. <a href="http://www.herbariasoap.com/sweet-almond-oil-soaps-and-products">Sweet almond oil</a> softens skin. <a href="http://www.herbariasoap.com/alkanet-soaps">Alkanet </a>gives the purple color. Want the regular <a title="French Lavender bar" href="/french-lavender-soap.html">French Lavender bar</a>?</p> <p>&nbsp;</p> <p><img src="https://herbariasoap.com/images/companies/1/WebMCinhand.jpg?1712352604760" alt="Luffa Soap Lemon May Chang Loofah Soap" width="460" height="368"></p> <p><strong>Lemon May Chang Luffa</strong> is a pure citrus delight with essential oils of <a href="http://www.herbariasoap.com/may-chang-soaps">may chang</a> and <a href="http://www.herbariasoap.com/lemon-soaps">lemon</a>. <a href="http://www.herbariasoap.com/shea-butter-soaps-and-products">Shea butter </a>moisturizes your skin. The yellow color comes from fresh <a href="http://www.herbariasoap.com/turmeric-soaps">turmeric</a>. Want the regular <a title="May Chang bar" href="/may-chang-soap.html">May Chang bar</a>?</p> <p>&nbsp;</p> <p><strong><img src="https://herbariasoap.com/images/companies/1/WebSpyLuffainhand.jpg?1712352677183" alt="Luffa Soap Soapy's Choice Loofah Soap" width="460" height="368"></strong></p> <p><strong>Soapy's Choice&trade; Luffa&nbsp;</strong>acts like a curry comb for a dog's coat, a soft brush to thoroughly<span class="dc_bld"></span> clean hair and fur. Soapy's Choice contains canine-friendly essential oils of <a href="http://www.herbariasoap.com/lavender-soaps">lavandin</a>, <a href="http://www.herbariasoap.com/peppermint-soaps">peppermint</a>, <a href="http://www.herbariasoap.com/cedarwood-soaps">cedarwood</a>, <a href="http://www.herbariasoap.com/rose-geranium-soaps">geranium</a>, <a href="http://www.herbariasoap.com/lemon-eucalyptus-soaps">and lemon eucalyptus. </a><a href="http://www.herbariasoap.com/jojoba-oil-soaps-and-products">Jojoba oil</a> and <a href="http://www.herbariasoap.com/neem-oil-soaps">neem oil </a>are extra emollients for a healthy coat and skin. Want a regular <a title="Soapy's Choice bar" href="/soapys-choice-soap.html">Soapy's Choice bar</a>?</p> <p>&nbsp;</p> <p><strong><img src="https://herbariasoap.com/images/companies/1/Web3Xinhand.JPG?1712352720124" alt="Luffa Soap Triple Mint Oatmeal Loofah Soap" width="460" height="368"></strong></p> <p><strong>Triple Mint Luffa</strong> is a super-refreshing minty blend of essential oils of <a href="http://www.herbariasoap.com/cornmint-soaps">cornmint</a>, <a href="http://www.herbariasoap.com/peppermint-soaps">peppermint</a>, <a href="http://www.herbariasoap.com/spearmint-soaps">and spearmint</a>. <a href="http://www.herbariasoap.com/cocoa-butter-soaps">Cocoa butter</a> makes the bar moisturizing. The luffa doesn't contain the oatmeal in our <a href="/triple-mint-oatmeal-soap.html">T</a><a title="Triple Mint Oatmeal bar" href="/triple-mint-oatmeal-soap.html">riple Mint Oatmeal bar</a>.</p> <p>&nbsp;</p> <p><img src="https://www.herbariasoap.com/images/companies/1/meteor/PouringFixed600-70.jpg?1541800228857" alt="making luffa soaps loofah Soap" width="600" height="435"></p> <p>To make Luffa Soap, we pour just-mixed soap into a tubular mold packed with a whole luffa.</p> <p>&nbsp;</p> <p><img src="https://herbariasoap.com/images/companies/1/luffatubes475-80.jpg?1612993089658" alt="luffas in the works loofah Soap" width="475" height="364"></p> <p>After a few days, the soap hardens, and the cylinder is cut into thick slices.&nbsp;</p> <p>&nbsp;</p> <p><img src="https://herbariasoap.com/images/companies/1/Crossection475-80.jpg?1612977868339" alt="Luffa slice Loofah crosssection" width="450" height="416"></p> <h3>Soap Categories</h3> <ul> <li><a href="/bestselling-soaps-and-products/">Bestselling Soaps and Products</a></li> <li><a href="https://www.herbariasoap.com/products-by-category/texture/exfoliating-textured-soaps/">Exfoliating/Textured Soaps</a></li> <li><a href="https://www.herbariasoap.com/products-by-category/scent-group/herbal-soaps/">Soaps and Products with Herbal scents</a></li> <li><a href="https://www.herbariasoap.com/products-by-category/scent-group/mens-favorites-soaps/">Men's Favorite Soaps and Products</a></li> <li><a href="http://www.herbariasoap.com/mint">Mint Soaps and Products</a></li> <li><a href="/spice/">Soaps and Products with Spice Scents</a></li> <li><a href="http://www.herbariasoap.com/exfoliating">Textured Soaps</a></li> </ul> luffa soap Exfoliating Luffa Soaps, 6.5 oz., scented with essential oils. Buy 6 get 1 free. Free shipping on orders over $60. Lavender, Lemon, Mint, Biotherapy Black, Camper’s Choice, Soapy’s Choice. Herbaria Luffa (Loofah) Soap on a Rope - Handmade - All Natural <p><span style="font-size: 14pt; font-family: georgia, palatino, serif; color: #008000;">7 sublime varieties </span></p> 12.95000000 1M,15,16,17,19,20,26,41,43,44,46,47,52,53,54,55,60,64,67,68,69,73,74,79,83,94,101,109,120,123,175,179,192,229,230,233,234,235,236,237,238,240,241,251,255,261,264,265,267,295,304,306,258,336 451019 Herbaria 3591 luffa-soaps 1