Jump to content

Need help with another Semper Fi extension


Recommended Posts

I currently have his Random Homepage Products extension active. But I can't figure out how to keep it from showing sold items. Hopefully this is going to be easy to fix. I don't know if the code change would be in the skin file or the class file, and nothing I have guessed at has worked.

https://plushmemories.com/lovie-shoppe/index.php

Link to comment
Share on other sites

If it's there I can't find it. We have not added any new stock since 2019, but we sold a lot in 2020. So the Sold items in a random assortment are much more obvious.

This is the store where we DO intentionally continue to show sold items to customers, as we send them to our free FaceBook group for help finding one in stock. But I don't want them showing on the homepage.

You provided this code some years ago to keep the sold ones off the Latest Items homepage:

      {foreach from=$LATEST_PRODUCTS item=product}
{* BSMITHER ADDED LINE BELOW TO SHOW ONLY IN-STOCK ITEMS *}
{if $product.stock_level lt 1}{continue}{/if}

But when  tried to put it in the skin file for the extension I get no products showing at all.

Link to comment
Share on other sites

If you are putting all of the above code in the module's skin code verbatim, then that is not a correct approach.

If you are just adding:

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

into the module's skin code, then the name of the variable needs to be adjusted:

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

This is how I see it. (I haven't tested.)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...