PDA

View Full Version : Including stuff (or trying to, anyway)


chartfieldconsultants
24-01-08, 12:04
I wondered if I could pick the brains of someone who knows a bit about the back end.

Hopefully this is a simple thing, and it's just my coding inexperience that can't troubleshoot it.

I run SW in conjunction with WordPress and have recently started trying to include SW hotpicks in the WP sidebar, and the WordPress loop of latest posts on SW product pages.

Can't get either to work.

For the hotpicks-in-WP side of things I followed the instructions in the SW customisation documentation, using:

<?php

require_once('global.inc.php');

include('includes/elements/hot_picks.php');

?>

and I got a variety of interesting errors that suggested problems with the file paths, and which I can't reproduce today. Instead, I'm now getting this error:

soaperror Object ( [sCode] => SOAP-ENV:Server [sString] => SOAP-ERROR: Encoding: Violation of encoding rules [sDetails] => getHotPickProductList: )

1

In case it was WordPress affecting it, I tried the same thing in a blank HTML page and a blank PHP page - both failed.

And that's where I am now. Look familiar to anyone?

Trying it the other way round, I couldn't get a PHP include to work at all in a SW template page. Can anyone paste a sample line of code that *ought* to work, even if it's only to generate a "hello world" message, so that I can see what I ought to have been doing?

Thanks in advance,

Andy

* Sod - how did this end up in this section of the forum? It was meant to go somewhere more relevant. *