Jump to content

Resolved - Revisit to Out of Stock only for Boxes


Dirty Butter

Recommended Posts

From my experiments, two things need to be set:

Store Settings, Stock tab, Hide out-of-stock product: green tick

Product Add/Edit screen, Use Stock Level: green tick

Then (I think) any out-of-stock item simply will not show anywhere, not even if you specifically call for it via ?_a=product&product_id=1

Are you still wanting the ability to directly browse to an out-of-stock item? (I'll be working on that shortly for another post.)

Link to comment
Share on other sites

i'm sorry, I didn't stress enough - I do NOT want to hide all out of stock items. I just don't want them to show in the "featured" areas, like Featured, Latest, and Sales Items. I DO want them to show in the Categories and search, as part of our business model is helping people find things we don't have in stock.

Link to comment
Share on other sites

We could try a display logic approach. If any product amongst the Latest Products has zero-level stock (actually, less than one), skip creating the HTML for it.

Using {debug} on the content.homepage.php file, we see that $product.stock_level is available.

So, find:

{foreach from=$LATEST_PRODUCTS item=product}

and add after

{if $product.stock_level lt 1}{continue}{/if}

Link to comment
Share on other sites

Thanks, Bsmither! This seems much more logical to me than "featuring" something that is out of stock. Latest Items worked perfectly for me, but I'm using a mod for Homepage Sale Items and my Fusion skin is not letting me use your Featured code, either. But this will certainly help someone else!

Link to comment
Share on other sites

  • 2 weeks later...
  • 10 months later...

Revisiting this again - sorry. On our 5.2.2 kurouto store we do not show out of stock items. But I just noticed the Featured Item was an out of stock one. Any ideas why that would happen?

I tried the {if... solution for box.featured.php shown above, just to see what it would do. It skips the Featured box completely if the random happens to land on an out of stock item - doesn't show the Featured Product heading at all and does not leave a space of the box, either - which is better than showing something as featured we don't even have.

But it's strange that this would be necessary.

Link to comment
Share on other sites

Account Settings are set to not show out of stock items. The item is out of stock, but the actual settings on the item are still showing green checks on Status, Include in Latest Items, and Use Stock Level.

"This" referred to having to use the same Post#4 edit for a store set to not show out of stock items.

Link to comment
Share on other sites

Keep in mind that when viewing the storefront as a logged-in admin, there are things that get displayed when they would otherwise not be displayed to a customer: out-of-stock items is one of those things.

 

Is it the case that you are viewing the storefront as a logged-in admin?

Link to comment
Share on other sites

An "export list" of products is downloadable -- the URL to "pull" these lists is accepted by CubeCart from the "public", such as a Google store, provided there is an accesskey included in the request. But a logged in admin can also use these "public pull" URLs to get the list so that the list can be examined for errors.

 

Hiding prices until logged in (a store general setting) is overridden for admins.

 

Hiding out-of-stock items can be overridden.

 

The store can be put into "Offline Mode", and is overridden for admins.

 

The language pack displayed by the store will be that of the logged-in admin instead of the default language.

 

The function that determines the currentPage is affected by a logged-in admin, but I'm not sure exactly how.

 

The function that creates search-engine-friendly URLs is affected somehow.

 

These are the features that initially come to mind.

Link to comment
Share on other sites

  • 5 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...