2011-05-02 4 views
0

미등록 사용자가 장바구니 정보를 얻을 수있는 곳을 아는 사람이 있습니까? 로그인하지 않은 사람들로부터 포기한 수레를 볼 수 있기를 원합니다. 이것은 magento의 기본 기능인 것 같지 않지만 어딘가에있는 DB에있는 느낌이 들었습니다.Magento의 미등록 포기 카트 추적

답변

0

에 저장되며,이 내가 데이터베이스에서 직접 카트 항목을 포기 얻기를위한 해낸 SQL 쿼리입니다. 당신은 내가 체크 한 날짜

SELECT quote_id, sku, qty, price, custom_price, row_total, created_at, product_id, store_id 
FROM mage_sales_flat_quote_item 
WHERE created_at > "2011-04-01" 
AND quote_id NOT IN (SELECT quote_item_id AS quote_id FROM mage_sales_flat_order_item) 
AND store_id IS NOT NULL 
1

모든 따옴표가 sales_flat_quote 테이블 아무도 관심이 경우

0

이 쿼리를 변경하고 어떤 결과가 결과에서 누락하지만 젠토 포기 카트 보고서에 표시되는 하나 또는 두 개의 사례를 발견해야합니다. 여기 내가 시도한 것이있다.

SELECT entity_id, customer_firstname, customer_email, items_count, grand_total, created_at 
FROM sales_flat_quote 
WHERE entity_id NOT IN (SELECT quote_item_id AS quote_id FROM sales_flat_order_item) 
AND items_count >0 
AND customer_email IS NOT NULL 
ORDER BY `sales_flat_quote`.`created_at` DESC 
0

이것은 더 비슷합니다.

SELECT `main_table`.*, GROUP_CONCAT(item.sku) AS `skus`, (main_table.base_subtotal_with_discount*main_table.base_to_global_rate) AS `subtotal`, `cust_email`.`email`, `cust_fname`.`value` AS `firstname`, `cust_lname`.`value` AS `lastname`, CONCAT_WS(' ', cust_fname.value, cust_lname.value) AS `customer_name` FROM `sales_flat_quote` AS `main_table` 
INNER JOIN `sales_flat_quote_item` AS `item` ON item.quote_id = main_table.entity_id 
INNER JOIN `customer_entity` AS `cust_email` ON cust_email.entity_id = main_table.customer_id 
INNER JOIN `customer_entity_varchar` AS `cust_fname` ON cust_fname.entity_id = main_table.customer_id AND cust_fname.attribute_id = 5 
INNER JOIN `customer_entity_varchar` AS `cust_lname` ON cust_lname.entity_id = main_table.customer_id AND cust_lname.attribute_id = 7 WHERE (items_count != '0') AND (main_table.is_active = '1') AND (main_table.created_at >= '2013-02-04 00:00:00' AND main_table.created_at <= '2013-02-04 24:00:00') AND (main_table.updated_at >= '2013-02-04 00:00:00' AND main_table.updated_at <= '2013-02-04 24:00:00') GROUP BY `item`.`quote_id` ORDER BY updated_at DESC