Jump to content

Recommended Posts

I have modified my category page to show an item as sold when it sells.  My category page is VERY modified.  What I need is for the sold items to NOT show in their category page at all.  I still want to keep them in the category just don't want them to show on the category page.  Why?  Well if someone clicks on the item in say Pinterest I still want them to go to that page because it shows my related products that they may decide to purchase.

 

Store Settings:

Global Sock Warning -1   Hide out of stock products checked.

 

Thanks for any help.

Capture-Sold-Categories-400.png.494f1d2f69d02558feeb39e1ca4c9042.png

Capture-products-stock300.png.8d663078b1a264e93046a1d61280e99e.png

 

Share this post


Link to post
Share on other sites

We need to know if your CubeCart code version gives the 'available' parameter for a product. If so,

in the skin template content.category.php, find:

{foreach from=$PRODUCTS item=product}

On a new blank line after that, add:

{if $product.available le 0}{continue}{/if}

 

Share this post


Link to post
Share on other sites

That didn't work.  Here is my code:

{/if}
<div id="ccScroll">
  <ul class="small-block-grid-1 medium-block-grid-3 large-block-grid-3 product_list" data-equalizer>
      {foreach from=$PRODUCTS item=product}
            <li>
         <form action="{$VAL_SELF}" method="post" class="panel add_to_basket">
                  <div class="product_grid_view">
               <div data-equalizer-watch>
                  <div class="text-center">
                     <a href="{$product.url}" title="{$product.name}"><img class="th" src="{$product.thumbnail}" alt="{$product.name}"></a>
                  </div>
                <h6 class="pad-top"><a href="{$product.url}" title="{$product.name}">{$product.name|truncate:65:"&hellip;"}</a></h6>
                  </div>
                <div class="medium darkred">Product Code:&nbsp;{$product.product_code}</div>
        
                   <div class="pad-bottom bold">
{if $product.available and $product.ctrl_stock}
   {if $product.ctrl_sale}<span class="old_price">{$product.price}</span> <span class="sale_price">{$product.sale_price}</span>
   {else}
      {$product.price}
   {/if}
   {else}&nbsp;
{/if}
</div>
 
               {if $product.available <= 0}
             <div class="row collapse marg-top">
               <div class="small-12 columns">
                <div>  <a href="{$product.url}" title="{$product.name}" class="button medium secondary radius left">More Info</a></div>
                <a href="{$product.url}" title="{$product.name}"
 <input type="submit" class="button disabled medium radius right" disabled>See Listing            </a>    </div>
            </div>

 

Share this post


Link to post
Share on other sites

I see in your code that there is {$product.available}, so if the edit does not work, either:

* CubeCart's internal cache was not cleared and a cached unedited template was used, or

* The parameter {$product.available} must be true-ish even though it is out of stock (can be made true-ish by overridding with an admin setting, or by a logged-in admin viewing the page).

Share this post


Link to post
Share on other sites

I cleared the cache from admin and also deleted the files from cPanel.  When I unchecked available for purchase and use stock level from the product page in admin it worked.  It is no longer showing in the category page.  Thanks Brian

Share this post


Link to post
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.

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