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.


Edited by Dirty Butter
Link to comment
Share on other sites

Posted (edited)

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}
{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.

Edited by Dirty Butter
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

Join the conversation

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

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...