Skip to content

Price Index / Price #5

Description

@Genaker

SELECT catalogrule_product_price.product_id, catalogrule_product_price.rule_price FROM catalogrule_product_price WHERE (rule_date = '2021-10-12') AND (website_id = '1') AND (customer_group_id = 0) AND (product_id IN('25718'))

Price Index SQL catalog_product_index_price ...

SELECT e.*, price_index.price, price_index.tax_class_id, price_index.final_price, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS minimal_price, price_index.min_price, price_index.max_price, price_index.tier_price, cat_index.position AS cat_index_position, stock_status_index.stock_status AS is_salable, links.link_id, links.product_id AS _linked_to_product_id, link_attribute_position_int.value AS position FROM catalog_product_entity AS e INNER JOIN catalog_product_index_price AS price_index ON price_index.entity_id = e.entity_id AND price_index.customer_group_id = 0 AND price_index.website_id = '1' INNER JOIN catalog_category_product_index_store1 AS cat_index ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id=2 LEFT JOIN cataloginventory_stock_status AS stock_status_index ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1 INNER JOIN catalog_product_link AS links ON links.linked_product_id = e.entity_id AND links.link_type_id = 1 LEFT JOIN catalog_product_link_attribute_int AS link_attribute_position_int ON link_attribute_position_int.link_id = links.link_id AND link_attribute_position_int.product_link_attribute_id = '1' INNER JOIN catalog_product_entity AS product_entity_table ON links.product_id = product_entity_table.row_id AND (product_entity_table.created_in <= '1630438980' AND product_entity_table.updated_in > '1630438980') WHERE ((e.entity_id NOT IN('109340')) AND (links.product_id in (81983)) AND (e.row_id != '81983')) AND (e.created_in <= '1630438980') AND (e.updated_in > '1630438980') ORDER BY e.entity_id ASC LIMIT 20

Option Prices :

SELECT main_table.*, default_option_title.title AS default_title, store_option_title.title AS store_title, IF(store_option_title.title IS NULL, default_option_title.title, store_option_title.title) AS title, default_option_price.price AS default_price, default_option_price.price_type AS default_price_type, store_option_price.price AS store_price, store_option_price.price_type AS store_price_type, IF(store_option_price.price IS NULL, default_option_price.price, store_option_price.price) AS price, IF(store_option_price.price_type IS NULL, default_option_price.price_type, store_option_price.price_type) AS price_type FROM catalog_product_option AS main_table INNER JOIN catalog_product_entity AS cpe ON cpe.row_id = main_table.product_id AND (cpe.created_in <= '1630438980' AND cpe.updated_in > '1630438980') INNER JOIN catalog_product_option_title AS default_option_title ON default_option_title.option_id = main_table.option_id LEFT JOIN catalog_product_option_title AS store_option_title ON store_option_title.option_id = main_table.option_id AND store_option_title.store_id = 1 LEFT JOIN catalog_product_option_price AS default_option_price ON default_option_price.option_id = main_table.option_id AND default_option_price.store_id = 0 LEFT JOIN catalog_product_option_price AS store_option_price ON store_option_price.option_id = main_table.option_id AND store_option_price.store_id = 1 WHERE (cpe.entity_id = '109340') AND (default_option_title.store_id = 0) ORDER BY sort_order ASC, title ASC - > []

Tire customer Group Price:

SELECT catalog_product_entity_tier_price.value_id AS price_id, catalog_product_entity_tier_price.website_id, catalog_product_entity_tier_price.all_groups, catalog_product_entity_tier_price.customer_group_id AS cust_group, catalog_product_entity_tier_price.value AS price, catalog_product_entity_tier_price.qty AS price_qty, catalog_product_entity_tier_price.percentage_value FROM catalog_product_entity_tier_price WHERE (website_id = 0) AND (row_id = '81983') ORDER BY qty ASC

CAtalog rule Product Price:

SELECT catalogrule_product_price.product_id, catalogrule_product_price.rule_price FROM catalogrule_product_price WHERE (rule_date = '2021-10-12') AND (website_id = '1') AND (customer_group_id = 0) AND (product_id IN('109340')) - > []

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions