You are here:  » WP Page layout & deep links

Support Forum



WP Page layout & deep links

Submitted by roymartian on Sun, 2010-05-30 22:26 in

Hi Guys,

Thanks for previous help all up and running now - great product.

Used your php code to searchexternal.php and can now show results in my wp site.

However I have 2 issues I am stuck with if you are able to help;

1. Layout is a bit messy, could you please advise file and best method to adjust layout?

2. On clicking on my feed products, no page found

You can see my issues here, {link saved}

Grateful if you could advise.

Regards
Roger

Submitted by support on Sun, 2010-05-30 22:59

Hi Roger,

What's happened is that whilst you have enabled clean URLs in your Price Tapestry installation ( in /shopping/ ), you have not yet created the corresponding .htaccess file.

You need to create this by starting with the htaccess.txt file that you will find in your Price Tapestry installation folder, and saving it as .htaccess. Then, edit the file, and change line 5 (in your particular case) to:

RewriteBase /shopping/

Alternatively, it may be easier to edit as htaccess.txt, upload, and then rename to .htaccess using your FTP program. In the remote window, right-click on htaccess.txt and look for Rename, and then change the name to .htaccess.

You should then find that the product links, and also the browse by merchant / category / brand links will work fine, as I just browsed to your /shopping/ folder and noticed that they are not currently working there either.

With the above in place, the links generated within your WordPress site by searchExternal.php should then also work.

Regarding the layout; bear in mind that when Price Tapestry's HTML files are included via the external scripts, they do not have any of the default styling applied to them as they do when browsing the actual Price Tapestry installation.

Each particular HTML file, for example html/searchresults.php (which is included by searchExternal.php) starts with a DIV, defined with a class corresponding to the element of the site it is generating, for example in that file, you will find:

<div class='searchresults'>

These classes are defined in the default.css file that you will find in your Price Tapestry folder (/shopping/ in your case). However, when these files are included via the external scripts, it is your WordPress theme CSS that is determining the page layout, so what you need to do is to create classes in your WordPress theme CSS for the class names required. As a starting point, I would suggest copying the .searchresults block from default.css, and pasting that into your WordPress .css, and then adjust the layout as required from there to fit in with the rest of your WordPress template style...

Hope this helps!

Cheers,
David.

Submitted by roymartian on Mon, 2010-05-31 02:22

Hi David,

Wow, fantastic support, will adjust and test as you advised.

Thank you,
Roger.

Submitted by roymartian on Mon, 2010-05-31 12:23

Hi David,

Your advice is working, could you help a little further as want to keep the selected product details in the wp page rather than moving to http://www.ukdirect.com.au/shopping/product/Brown-Leather-Suit-Belt-13956.html as I lose page template and 'Home' is not home for wp page.

Continuing to adjust css to improve layout as advised.

Big thanks,
Roger.

Submitted by roymartian on Mon, 2010-05-31 21:27

Hi David,

Not sure if previous message was sent, apologies if you have already received.

Products now shown on clicking them in Wp page, is there a way to keep the
Product on the word press page aswell rather than going to the shopping folder.

Thanks for your help
Roger

Submitted by support on Mon, 2010-05-31 21:44

Hello Roger,

Sure - but what you need is the "full" external script which will enable you to do that. If you could email me a copy of the existing "calling code" (the PHP code) that you have derived to call searchExternal.php within your WordPress page, I'll send the full external.php back to you with the equivalent calling code for that version...

Cheers,
David.

Submitted by roymartian on Tue, 2010-06-01 03:11

Thanks David,

You should now have an email with php code.

Roger.

Submitted by Stew on Tue, 2010-08-03 15:14

Hi David, I was just looking through this thread as I am trying to use clean product URLS with WP.

I have changed the .htaccess file as above and the products and urls are working fine from the PT install, however from within my wordpress page when I click on a product from a set of results the product url is:

http://www.mydomain.co.uk/product-page/?q=jumper&page=1&sort=priceAsc&minPrice=30.00&maxPrice=50.00&pt=1&product=Green+Mens+Jumper+Daks

Any idea how I can sort this?

Submitted by support on Tue, 2010-08-03 15:23

Hi Stew,

If you want to email me your external.php I'll modify it to hard code the product pages to /product-page/ (configurable via a new $external_action parameter)...

Cheers,
David.