Jump to content
thirty bees forum

Recommended Posts

Posted

Is there a reasoning why TB (actually PS and transfered to TB) made it so that products that are not on stock are shown by default on stores?

I am not sure if I am the only one but wouldnt most merchants want to show only products on stock by default?

Maybe some day we could have an option in settings to "Show only products on stock" by default instead of hacking our way into the .tpl file or using cron jobs for this simple task. Or is it just me?

Posted

If we did this at render time, so to say, I guess it would require a SQL query per displayed/requested product to check the stock quantities.

I that's true, wouldn't that be inefficient?

Posted

Well... when you load the product.tpl page you already have an array of the products.

Thats how I hack this issue at the moment, I go to the .tpl and if the product has 1 or more then it shows it otherwise it doesnt... I am sure you dont require any additional queries because I certainly dont need to add one to achieve it.

Posted

If I have a product that is out of stock, but I am going to re-stock it, then I like to still show it, that way people can ask about it, or put it in their wish lists. If I am not going to restock it, then I disable it, or delete it from my database.

Posted

@moy2010 no...

Say you click a category and there are 25 products... If 5 products are out of stock I want the page to just show the 20 that are on stock.

@slick_303 yes I get that situation. In my case I would rather not spend time answering customers regarding items that are not available because I can't restock that easily.

As soon as it is out of stock I don't show it... When I have it available again then I let the store show it again.

Posted

Got it. If the product page was indexed by Google and it appears on search results, do you display the product page it a user clicks on it?

I guess that your approach is useful for unique or rare products that cannot be easily found elsewhere.

Posted

@moy2010 said in Show On Stock products only by default?:

If the product page was indexed by Google and it appears on search results, do you display the product page it a user clicks on it?

That's something I didn't think about. I dont mind them clicking and seeing the product that way since they wont be able to add it to the cart.

The issue is that I tell my customers "The page only shows what is available" becasue they ask OVER and OVER again "Whats available today?"

I think my situation is not very common since the type of store I run has completely new products every months or so, and products I sold this month will not come back (probably ever). That's due to the kind of suppliers I have here in this country. I am really restricted on that topic tbh.

I am trying to fix that Importing goods directly from china but Importing to Dominican Republic is a royal pain in every sense.

  • 2 months later...
Posted

This could be an idea, too: https://forum.thirtybees.com/topic/1330/improvement-suggestion-and-help-how-to-implement-relating-to-default-combinations

Posted

it can be done with MySQL trigger, I've using this method and works great. Open your phpMyAdmin > click your database > go to triggers (between events & designer tab) > and add trigger

Trigger name: changevisibilityafterupdate Table: psstock_available Time: After Event: UPDATE Defitnion: BEGIN UPDATE ps_product_shop SET visibility="none" WHERE id_product IN (SELECT id_product FROM ps_stock_available WHERE quantity=0); UPDATE ps_product_shop SET visibility="both" WHERE id_product IN (SELECT id_product FROM ps_stock_available WHERE quantity>0); END Definer: just leave it blank

the result will looks like this 0_1516544083316_Screenshot from 2018-01-21 21-14-24.png

source: vekia

Posted

How easy would it be to create a 'In Stock' tab similar to 'Best Sellers' and 'New Products' (that shows up if there are some actually)?

I would love to move such a tab to be the first - that way a user sees only the in stock ones by default and can move to other tabs to see all products. I guess it is safe from a google indexing perspective as well.

Thoughts please?

Posted

@chandra I think no need for that, try MySQL trigger method from my post above, your shop will hide out of stock products from catalog and search (not disable the produtcs), so someone still can access the products using direct url including traffic from google seo or social media share link.

Posted

@dosbiner Thanks. But I would like the catalog and search to have the products available. I just want to highlight the in stock ones, so it is easier for the customer to order.

Posted

@chandra you could create a dedicated category for Products on stock and update the trigger above to associate / dissociate products to this category.

Then you could configure Featured products on the homepage module to show this category.

Alternative is to modify the source code of that module.

  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...