Does anyone know if there is anything that will allow a customer to search through their order history for a specific product or model number, without opening every order. I know Gary did an 'Already Purchased' hook but cant seem to find anything else suitable. Am I missing something.
We are doing away with all the side boxes on our next site so want the customers to be able to reorder products that they have previously purchased with having to search through every order they have placed.
Customers search orders or order history
- burt
- Core Team
- Posts: 4561
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Customers search orders or order history
The other one that may fit your needs a bit or not, would be "s10e05 Quick Reorder" - I think this one allows the customer to reorder a whole order with one click. However, the customer does not know what is inside each order until they look.
I don't know of anything that would allow the customer to search through their orders for a model or product name. It should be fairly straightforwardish to make though, you'd have some sort of search which searches the orders_products table for the given search term - you'd need to join the orders table to ensure they are searching only their own orders.
I don't know of anything that would allow the customer to search through their orders for a model or product name. It should be fairly straightforwardish to make though, you'd have some sort of search which searches the orders_products table for the given search term - you'd need to join the orders table to ensure they are searching only their own orders.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: Customers search orders or order history
You might want to have it search the products tables joined against the two order tables. Then you'd get back all the current data, which you could pass to the product listing. Something like
Code: Select all
SELECT m.*, %s
FROM
products p
INNER JOIN products_description pd ON p.products_id = pd.products_id
INNER JOIN orders_products op ON p.products_id = op.products_id
INNER JOIN orders o ON op.orders_id = o.orders_id
LEFT JOIN specials s ON p.products_id = s.products_id
LEFT JOIN manufacturers m ON p.manufacturers_id = m.manufacturers_id
LEFT JOIN (SELECT products_id, COUNT(*) AS attribute_count FROM products_attributes GROUP BY products_id) a ON p.products_id = a.products_id
WHERE p.products_status = 1 AND pd.language_id = %d AND o.customers_id = %d-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
-
14Steve14
- Senior Contributor
- Posts: 923
- Joined: Fri Oct 25, 2019 7:01 pm
- Phoenix Version: v1.0.9.1
- Has thanked: 17 times
- Been thanked: 103 times
Re: Customers search orders or order history
@heatherbell Thanks for that I will take a look.