You are here:  » Calling Featured Products to the home page in wordpress

Support Forum



Calling Featured Products to the home page in wordpress

Submitted by Paul1107 on Sun, 2009-11-08 15:36 in

Hi David,

Another question from numpydom I'm afraid...

Hope you might be able to point me in the right direction?

I'm trying to create a wordpress home page which consists of Featured products much in the same way a the default Price Tapestry home page works.

but getting an error the following error

Warning: Unknown(/home/sites/perfumesforwomen.org.uk/public_html/pt/featured.php): failed to open stream: No such file or directory in /home/sites/perfumesforwomen.org.uk/public_html/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()'d code on line 6

Warning: Unknown(/home/sites/perfumesforwomen.org.uk/public_html/pt/featured.php): failed to open stream: No such file or directory in /home/sites/perfumesforwomen.org.uk/public_html/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()'d code on line 6

I'm using the following calling code,

<?php
 $external_baseHREF 
"http://www.i-store.org.uk/";
 
$external_path "/home/sites/perfumesforwomen.org.uk/public_html/pt/";
 require(
$external_path."featured.php");
?>

To be fair the error message is also highlighting a wordpress plugin 'exec-php', which is a plugin designed to allow php code directly into the wordpress post, as I use the plugin on all my other sites along side PT without a problem, I suspect its the calling code I am applying to be the problem?

Best regards

Paul

Submitted by support on Mon, 2009-11-09 09:30

Hi Paul,

The full external.php shows featured products assuming that they are set-up in the /admin/ section of the external site; so all you should need to use is just:

<?php
 $external_baseHREF 
"http://www.i-store.org.uk/";
 
$external_path "/home/sites/perfumesforwomen.org.uk/public_html/pt/";
 require(
$external_path."external.php");
?>

Cheers,
David.

Submitted by Paul1107 on Mon, 2009-11-09 09:44

Hi David,

OK, I had one test product in as a featured product, Can I sure I'm doing this correct, I map a product in product mapping and then use that same description for the featured product, is that correct?

Cheers

Paul

Submitted by support on Mon, 2009-11-09 12:09

Hi Paul,

It is the name that must match; so whatever value you entered as a master product name in Product Mapping (assuming that a product with one of the alternatives was encountered during import and therefore subsequently given the mapped name) use exactly the same value in Featured Products...

Cheers,
David.

Submitted by Paul1107 on Mon, 2009-11-09 12:22

Hi David,

I think that's what I've done. However, If you have time, would you mind having a look at the url below, has I'm not sure if its related, but haven't seen these errors before on the home page? but this is the url from where the feed is being drawn from

{link saved}

Thanks

Paul

Submitted by support on Mon, 2009-11-09 12:25

Hi Paul,

I'm not sure what's happened there - if you browse to /html/featured.php it is making reference to admin files. Could you replace /html/featured.php with the original (unless you have made changes to it that you think might be causing this) and it should then display as normal...

Cheers,
David.

Submitted by Paul1107 on Mon, 2009-11-09 13:02

Hi David,

Sorted now, tried to get the table width to be 100%, can't see why that would have caused any problems, reverted back to original so no problems now.

Have also now got a featured product Yippee!

One question you may be able to help on is a css issue, the featured product box border is going beyond the right border of my column, Hence the reason I was trying the width="100%" above, any thoughts on how I might over come this?

Thanks again

Paul

Submitted by support on Mon, 2009-11-09 13:07

Hi Paul,

What's the URL where I can see the CSS issue? I went to the home page and the Featured Product is being displayed as normal, I don't see any border at all...

Cheers,
David.

Submitted by Paul1107 on Mon, 2009-11-09 13:12

Sorry David..

Submitted by support on Mon, 2009-11-09 13:16

Thanks, Paul.

I looked in /wp-content/themes/revolution_magazine-30/style.css where I found:

     .featured {
background: #FFFFFF;
float: left;
width: 590px;
margin: 0px 0px 10px 0px;
padding: 9px 9px 0px 9px;
border: 1px solid #C0C0C0;
}

...so if you remove the following line from that block:

border: 1px solid #C0C0C0;

...there shouldn't be any border around the Featured Product and it will appear as part of the main page....

Hope this helps!

Cheers,
David.

Submitted by Paul1107 on Mon, 2009-11-09 13:56

Thanks David,

But the table still spilt outsite of the box, having looked at it again, I think the div classes clashed, so your .featured, clashed with my .featured and therefore created a nested div within itself causing the featured table to overflow out the higher level .featured div. Have now changed my class to id to compensate.

Thanks for your help again

Cheers

Paul