Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   Merchant Logo Product Display When No Products (/showthread.php?t=7208)

1800HART June 27th, 2012 02:40 AM

Merchant Logo Product Display When No Products
 
I don't know if this is a problem with me or datafeedr .....

Here's my code for the Merchant Logos in the sidebar.
Code:

<?php echo dfr_get_merchant_logos(); ?>
If you go to any of my sites ... e.g. this one http://software.HARTmarket.com ... in the sidebar there are images of merchant logos ... If I pick one ... TheNerds.net and click on it, the link goes to http://software.hartmarket.com/?merchant_id=1378 which is good, and only products in the store from TheNerds.net are displayed in the center content column.

But - if I take another vendor shown in the sidebar .. Farm & Home Supply Center .. which links to http://software.hartmarket.com/?merchant_id=1291 .... I get no products displayed and there is a message "There are no products in the store.".

>> I'm thinking that if merchant logos exist in the store there should be products in the store from that merchant! At minumum, if the merchant logos were downloaded in the store and displayed in the sidebar - at least ONE TIME AGO since I set up this store and/or the automated product feed download has been updated since going online that at least one product from that merchant MUST have existed in the store!

So - if it's not there, either the product has been removed from the store or maybe (not in this case) but it's possible I might have gone into the Factory Store and reshuffled categories or maybe even defined the keywords better so perhaps (maybe in this case) farm products wouldn't appear in my software store.

-- Anyway - if no products exist in the store, it would be ideal if the merchant logo didn't appear in the sidebar. Eric - is there some fancy schmancy PHP coding that can help omit the zero products in store search and merchant logos from appearing in the store?

Thanks.
HART

Eric June 27th, 2012 08:57 AM

Hi

My query from this page /showthread.php?t=6828 was ignoring products in hidden categories. I've updated the query on that page.

Just update your functions.php file and then click the [Update Settings Only] button.

Eric

1800HART June 27th, 2012 12:11 PM

Quote:

Originally Posted by Eric (Post 33079)
Hi

My query from this page /showthread.php?t=6828 was ignoring products in hidden categories. I've updated the query on that page.

Just update your functions.php file and then click the [Update Settings Only] button.

Eric

Thanks Eric!

Your modification (WHERE state=1) reduced the merchant logo just on that store from 57 merchants in the sidebar, to 23 ... so, I'm guessing that did the trick!

Eric June 27th, 2012 12:13 PM

Quote:

Originally Posted by 1800HART (Post 33088)
Your modification (WHERE state=1) reduced the merchant logo just on that store from 57 merchants in the sidebar, to 23 ... so, I'm guessing that did the trick!

That's right. You have a lot of products (over 4,000) in a hidden category.

1800HART June 27th, 2012 12:33 PM

Quote:

Originally Posted by Eric (Post 33089)
That's right. You have a lot of products (over 4,000) in a hidden category.

:D ...

I know! Although in my defense some stores have hidden categories with so few products in them, that won't even last to Halloween, if drip feeding only one product a day from that hidden category :P


thanks again/
HART

1800HART June 27th, 2012 11:54 PM

Eric.

Rather than fit all the merchants in the sidebar (or, rather every sidebar pageview) .. I'm thinking of doing this - http://hartmarket.com/ ... in the center column on the store front.

Is there a way to get padding before/after top/bottom of each merchant logo so it looks more like a bunch of logos than one huge box image? In my functions.php I've just set the images to w100/h22 and just want to get a nice spread inside my blockquote there.

Eric June 28th, 2012 07:21 AM

Sure, just use CSS to add some padding:

HTML:
HTML Code:

<div class="merchant_logos">
<a href="#"><img src="..." /></a>
<a href="#"><img src="..." /></a>
<a href="#"><img src="..." /></a>
</div>

CSS:
Code:

.merchant_logos a img { padding: 10px; }
Eric

OFF TOPIC: Your page took almost 2 minutes before any content appeared. It took about 44 seconds just for your server to respond to the request. You should contact your host about this:


1800HART June 29th, 2012 01:10 PM

Quote:

Originally Posted by Eric (Post 33114)
Sure, just use CSS to add some padding:

HTML:
HTML Code:

<div class="merchant_logos">
<a href="#"><img src="..." /></a>
<a href="#"><img src="..." /></a>
<a href="#"><img src="..." /></a>
</div>

CSS:
Code:

.merchant_logos a img { padding: 10px; }
Eric

OFF TOPIC: Your page took almost 2 minutes before any content appeared. It took about 44 seconds just for your server to respond to the request. You should contact your host about this:


Going to try your solution now ...

BTW ... I've been mentioning this many times with my host but, finally showed them your comment yesterday and image and this is what they said (after doing a fsck and reboot) ...

Quote:

Greetings,

The load on the server is slightly over 8.00, which is not normal for an 8-core server. I went ahead and disabled analog statistics, and left webalizer enabled, as analog is often a strain on CPU and Disk I/O resources. After doing this, the load has lowered, and stability has increased. I noticed that often, the wp-cron settings for the market account are using the most CPU resources. You may want to verify that it is being used properly, and that Wordpress on that account is configured correctly. Please let us know if you have any further issues going forward. Thanks and have a good day.

I guess I should probably cut back on the automated video posting daily per store on tips or other related product stuff.

Since that comment, my sites still timed out from full RAM and CPU usage and especially during the overnight backups of the MySQL databases when my sites always time out... so, don't think it was an analog statistic issue that was such a strain .. I don't see it.

Eric June 29th, 2012 01:44 PM

Hi

WP Cron is notorious for causing extreme loads on servers. It runs very often. I have not found a solution to this issue though it's an issue I haven't dealt with in a long time (basically since we stopped relying on WP Cron to Drip Products).

Eric

1800HART June 29th, 2012 01:45 PM

Worked!
http://www.diigo.com/item/image/1d8vg/6081?size=o

Have the code set as
Quote:

<div class="merchant_logos">
<?php echo dfr_get_merchant_logos(); ?>
</div>
and settings 2px padding, and images w104 x h28 :D

THANKS Eric! D

1800HART June 29th, 2012 01:47 PM

Quote:

Originally Posted by Eric (Post 33138)
Hi

WP Cron is notorious for causing extreme loads on servers. It runs very often. I have not found a solution to this issue though it's an issue I haven't dealt with in a long time (basically since we stopped relying on WP Cron to Drip Products).

Eric


I still plan to review the themes next week, but now I'll just turn off all crons on the sites (non-datafeedr stuff that is) and see if it makes a difference until then ... but - doesn't the datafeedr drip feed count as a wp cron action?


All times are GMT -5. The time now is 12:55 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.