Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Ad/Special between product listing

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-17-2011, 05:24 AM
 
uglysign uglysign is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 70
 

Default Ad/Special between product listing

hey all,

Is there a mod or code I can use that can 'break' between
the products listing? Anotherwords, 20 products (4 across/5 rows) on a page.
I'd like to put something after 8 products continue with 8 more and so on if need be. I havent been working with my site for a while so this code stuff is rusty. But i'll manage if guided right.

ex. + is product || = is divider/product/ad etc

+ + + +
+ + + +
=====
+ + + +
+ + + +
=====
+ + + +
+ + + +


Any help would be appreciated!

Ronnie
__________________
4.4.3
One Page Checkout :: OnSale :: Download Expander
Smart Template by X-Cart MODS
Reply With Quote
  #2  
Old 04-17-2011, 07:27 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Ad/Special between product listing

Products are called in a loop - either "foreach" (http://www.smarty.net/docs/en/language.function.foreach.tpl) or "section" (http://www.smarty.net/docs/en/language.function.section.tpl). You can use iteration to show whatever you want after so many loops.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 04-17-2011, 10:25 AM
 
uglysign uglysign is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 70
 

Default Re: Ad/Special between product listing

Thanks Steve,

You're probably good at this stuff but trying to figure it all out is a bit out of my league for what I'd like to do. I'll pass for now.

again, Thanks for the reply.



Actually I was thinking of getting one of those banner modules where I can highlight certain products that are onsale etc.
If I could only get the code to call on those files that would be novel. As you say that section might be the area, but I cant figure where to put it after 8 products.

This code is toward the bottom of the category template mod:
(Im using Multiple Product Listing / Category Templates w/ a custom template)

Code:
{if $cell_counter lt 4} {section name=rest_cells loop=4 start=$cell_counter} <td class="halftones4">&nbsp;</td> {/section} </tr> {/if}
__________________
4.4.3
One Page Checkout :: OnSale :: Download Expander
Smart Template by X-Cart MODS
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:50 PM.

   

 
X-Cart forums © 2001-2020