Jump to content

Category Styling and Pagination


Recommended Posts

I have a couple of inquiries.

1.  How can I add an image to the category description without selecting it from the category images tab.  I want to be able to code special images into the description.  Ex. Listed only on ebay ( ID 268)  and Listed only on Etsy (ID 269). If I keep the code for the category images then very very large images show on sub category pages above the sub-cat images and subcat_name.  I still want to select the sub-category images from their category images tab. Don't know if this matter but I was using Semper Fi Vertical Navigation Menu.  I now have my menu coded directly into the main template and box.canvas.left files without breakdowns for the sub-cats, though in admin there are sub-cats on some categories. Ashtrays and Bottles and Jugs are some examples.

 

2.  I have my pagination at the top and bottom of the category page.  If a category only has one page of products the space for pagination still shows.  How can this be removed.

 

3.  Does it seem since CC6.4.3 you have to clear the cache more often?  Use to be I only had to clear it after I changed images now it seems every little change I make I have to clear the cache.

 

Here's my code:

<!-- {if isset($category.image)}

<div class="row">

   <div class="small-12 medium-12 large-12 columns center marg-top"><img src="{$category.image}" alt="{$category.cat_name}" class="marg-bottom"></div>

   </div>

{/if}  -->

{if !empty($category.cat_desc)}

<div class="row">

   <div class="small-12 medium-12 large-12 columns">{$category.cat_desc}</div>

</div>

{/if}

{/if}

<div class="title-category">{$category.cat_name}</div>

{if isset($SUBCATS) && $SUBCATS}

<ul class="small-block-grid-3 medium-block-grid-6 large-block-grid-6 text-center" data-equalizer>

   {foreach from=$SUBCATS item=subcat}

   <li data-equalizer-watch>

      <a href="{$subcat.url}" title="{$subcat.cat_name}">

        <img class="th" src="{$subcat.cat_image}" alt="{$subcat.cat_name}">

      </a>

      <br>

      <div class="cat-prodname"><a href="{$subcat.url}" title="{$subcat.cat_name}">{$subcat.cat_name}</a></div>

   </li>

   {/foreach}

</ul>

<hr>

{/if}

{if $PRODUCTS}

<div class="row text-right right">

   <div class="small-6 medium-12 large-12 columns show-for-medium-up thinpad-top"> {include file='templates/element.paginate.php'}  </div>

</div>

{/if}

 

Thanks in advance for any and all help

Link to comment
Share on other sites

1. "I want to be able to code special images into the description." When composing the category description, click the Image toolbar icon. A window will popup where you can specify the web address of the image to use.

2. "If a category only has one page of products the space for pagination still shows." The "space", or an actual but incomplete pagination? Do you have the [More V] method of pagination, or the Page 1 [2] method?

If the "Page" method, then there is also the drop-down selector offered to the customer to show other than default number of products per page. I agree that this is not needed if you have a matching number of products for the smallest number per page configured for the skin. But if there is a smaller number (say, as a default, 12, but also there is an option for 6), then a decision to keep or dump the selector needs to be made. If dumping, we can try to code the pagination row to not show if count matches number per page.

3. "Does it seem since CC6.4.3 you have to clear the cache more often?" Since a few versions back, CubeCart no longer automatically clears the cache each time an admin form is POSTed. Now, it is suggested that the admin perform all necessary daily/weekly duties, and only then when finished, clear the cache.

However, when performing initial setup and infrequent development tasks, we suggest setting CubeCart to have its cache disabled.

 

Link to comment
Share on other sites

15 hours ago, bsmither said:

I want to be able to code special images into the description." When composing the category description, click the Image toolbar icon. A window will popup where you can specify the web address of the image to use.

I did the above but still it only shows the alt title.  Here's my code.  I know the link to the image is good because I tested it in my browser.

<p class="black marg-top"><a href="https://www.etsy.com/shop/ClaudiasBargains" target="_blank"><img alt="ClaudiasBargains on Etsy" src="https//www.claudiasbargains.com/skins/cb-streamline/images/icons/etsy-4230.gif" /></a></p>

 

2.  I use the 1  2  3 ....11 View All

Link to comment
Share on other sites

"a decision is needed to keep or dump the 'items per page' selector"

It looks like CB-Streamline is coded to not show the drop-selector that CubeCart core code provides to the sin.

Your skin code:

{if $PRODUCTS}
<div class="row text-right right">
   <div class="small-6 medium-12 large-12 columns show-for-medium-up thinpad-top">
   {include file='templates/element.paginate.php'}
   </div>
</div>
{/if}

Foundation skin code (effectively):

<div class="row">
   <div class="small-12 large-8 columns">
   {$PAGINATION}
   </div>
</div>

So, we know that CubeCart already populates the $PAGINATION skin variable if necessary.

However, I see CB-Streamline and Foundation both devoting a div row whether or not $PAGINATION has anything in it. (The variable $PAGINATION is a compiled skin template element.pagination.php populated in Database->pagination(). So, whether you use the element template directly, or use $PAGINATION, it should make no difference.)

That said, to suppress that div row, surround it as such:

{if $PAGINATION}
<div class="row">
   <div class="small-12 large-8 columns">
   {$PAGINATION}
   </div>
</div>
{/if}

 

Link to comment
Share on other sites

 So would my skin/content/category look like this for the top pagination:

{if $PRODUCTS}

{if $PAGINATION}
<div class="row text-right right">
   <div class="small-6 medium-12 large-12 columns show-for-medium-up thinpad-top"> {include file='templates/element.paginate.php'}  </div>
</div>
{/if}

{/if}

 

And this at the bottom pagination:

{if $PAGINATION}

<div class="row">

      <div class="small-12 large-9 columns">

         {$PAGINATION}

      </div>

     </div>

{/if}

 

And as for the image not showing - I get on my own nerves so much some times!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...