Post by Jantien » Thu Aug 25, 2016 4:26 pm

I have a problem that i would like to share
On my site I have a page with sold products (History)
When I use the search butten also the sold products are displayed
Is there a HTML solution to exclude the HISTORY page when using the search function.

I already studied the search template (search.tpl) but dont realy understand how this works

http://www.toonkamer-webshop.nl

New member

Posts

Joined
Sat Feb 06, 2016 10:50 pm

Post by knowband.plugins » Thu Aug 25, 2016 10:03 pm

Hi,

It is the default behaviour of Opencart, whenever you search for some string, it run a query in database and shows all result matching that string. There is no condition to exclude those products which are already boughts by customer.

This is not even recommended because how will a customer search for some already purchased products? May be he want to read its description, or want to buy it again.

If you still want to do this, it can be done by making changes in /catalog/controller/product/search.php.

Could you please tell us exactly which version of Opencart are you using so that we can tell you where to make required changes.

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by Jantien » Fri Aug 26, 2016 3:39 am

Thanks for replying
Yes I would very much like to exclude the products on the "historie" page.
It is very disturbing to have displayed all the sold products.

I use the original version 1.5.5.1
(the photograph shop)
But I made a lot of changes to the original templates.
To simplify the structure of the site
I also "cleaned up" the search template (search.tpl) as you mentioned.
Remko

New member

Posts

Joined
Sat Feb 06, 2016 10:50 pm

Post by knowband.plugins » Fri Aug 26, 2016 5:54 pm

We have developed a module which will allow you to exclude purchased products from search results.

Please note that it will work only when customer is logged in.

It is tested only for OC 1.5.5.1 but may also work with other version of 1.5 series.

Whenever some logged in customer will do search on the website, he/she will not see already purchased products in the search result.

This module is available to download for free and you can get it from here.

Let us know if you face some issue while using the module.

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by Jantien » Fri Aug 26, 2016 8:14 pm

Thanks for replying
But i am afraid that most of my visiters are not logged in
Especially them who are using the search function

Isnt it possible to make a HTML solution which excludes all the product with the price 0 euro
Or those who are out of stock.

New member

Posts

Joined
Sat Feb 06, 2016 10:50 pm

Post by knowband.plugins » Fri Aug 26, 2016 8:35 pm

At the time of search if they are not logged in, there is no way to know their purchased products.

But changes can be done in our module to exclude products with price 0 or quantity 0

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by Jantien » Sat Aug 27, 2016 4:21 am

Is it possible to modify your module so that products can be excluded without logging in?

New member

Posts

Joined
Sat Feb 06, 2016 10:50 pm

Post by knowband.plugins » Mon Aug 29, 2016 12:03 pm

Until customer is logged in, there is no way to know their purchased products?

Their email id is the only source to know about their already purchased products.

It is not possibe to modify our module to know previous order of Guest customers.

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by Jantien » Tue Aug 30, 2016 2:31 am

Oke
But it is not exactly what I meant
I just want to exclude sold products if someone uses the search option

For example if someone searches for TABLE (in my shop) than only tables that are still available are displayed.
Not the ones that are already sold.

It doesnt matter if someone is logged in or not,

(The name of the History page is not the buying historie of the clients but it is the page with sold products.)

New member

Posts

Joined
Sat Feb 06, 2016 10:50 pm

Post by knowband.plugins » Tue Aug 30, 2016 12:50 pm

Do you mean to exclude products which are purchased by anyone?

Do you have only one quantity of each product to sell on your store?

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by Jantien » Tue Aug 30, 2016 8:42 pm

Yes I sell single items
But if there are more of the same products it could may be be possible to exclude them (if they are sold out) by the "out of stock" That would be the most nice solution because anyone could use that.
Although that seems rather difficult to me because I don't see where to find the "out of stock" words.
And a problem with opencart 1.5.5.1 is that products that are marked out of stock can still be put in the cart and be sold.

May be it is possible to exclude on the price zero (0,00)
Products that are sold in my HISORIE page are priced 0,00

It should be possible to call for the price and than not display the product if the price is 0,00.
Somewhere in the search template

New member

Posts

Joined
Sat Feb 06, 2016 10:50 pm

Post by Jantien » Mon Sep 05, 2016 1:48 am

Thanks for the invitation
But first I want to try to find out if its possible to modify the original search template (catalog/controller/search.php) so more people can bennefit of that.

Is there some one who understands this realy well and could adjust some HTML to exclude product which are already sold (but still to be seen on a catagory page "SOLD PRODUCTS" ( in my case HISTORIE))

New member

Posts

Joined
Sat Feb 06, 2016 10:50 pm
Who is online

Users browsing this forum: No registered users and 11 guests