![]() |
Problem using "Display 2 prod per row" and "A
I put in to separate pieces of code I found on the site to fix two issues I had..
1) I put in the code in Product.tpl to display 2 products per row, and it works.. when I browse down through my categories I've got two per row with no issues. 2) I put in the code to fix the mySQL errors when you use the Advanced Search feature. Which finds the proper products with no errors now.. Now here is the problem.. with both scripts running, If I do a search that would yield 2 products.. it displays 4.. The first 2 displayed (on one row) are the two it should find.. the second 2 are both place fillers.. no product title, no price, no description.. nothing. If I search and get 3.. It shows 6.. 3 real, 3 blank. Anyone else have these two fixes in and had this problem?? Let me know, thanks! |
Hi Blackhawk,
This is a little beyond my scope, but it sounds like a problem with the loop pulling the products. Can you paster your code here so we can see? ;-> ATKOgirl |
Which way are you doing your 2 products per row?
1. Smarty's 'div by 2' feature 2. The check in Smarty for an "even" number that I saw posted in just the last week or 10 days |
Div by 2
Smarty Div by 2... got any ideas Deb?
|
This code?
I assumed you meant products.tpl.. I'm thinking that the way the info passes to the search engine.. that maybe the div by 2 command should be in a different place.. I mean.. browsing thru categories works fine.. its only on searches do I get the phantom doubling.
Code:
{* $Id: products.tpl,v 1.16 2002/09/25 10:12:05 zorg Exp $ *} |
Help ppl!!
BUMP AND HELP!!
|
Code:
{if $smarty.section.product.index is div by 2} should be: Code:
{if $smarty.section.products.index is div by 2} note s in products. ;) I think Code:
{section name=product loop=$products} name=product should be products as well, but give those two methods a try. |
Thanks
I've made the changes, but my site is so slow I can't load the front page.. I only have 2400 products, so I'm not sure why..
I've got a call in to my webhosting, but I don't think it's them.. It got slow right as I uploaded my inventory. so.. I'll test the changes when I can get my site sped up. Thanks!! |
Run a traceroute or a ping to your host and see if your getting any timeouts or high ping times, if so its your host, if not its the x-cart or mysql that is creeping along.
|
Traceroute
I tried that.. I did get one time out..
I have called my ISP.. also, what do you consider "high"? Most were <10ms.. some up to 15-18.. and then a few hit 88ms and one 102ms. |
All times are GMT -8. The time now is 09:48 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.