You are here:  » New Distribution 13/03A Now Available

Support Forum



New Distribution 13/03A Now Available

Submitted by support on Mon, 2013-03-04 13:41 in

Hi everyone,

Price Tapestry distribution 13/03A is now available to download.

Key Enhancements

  • 100% Valid HTML5/CSS3 standard template for improved site quality consideration by search engines
  • Voucher and discount code feed assisted voucher code management (more info)

Also Included

  • Zero down-time import mod - import thousands of products with no site interruption
  • Search result filters by merchant, category, brand and price
  • Improved indexing strategy for faster search results
  • Sitemap updated to version 0.9 protocol

12/10B Users
Search result filters, admin and sitemap upgrades are all available on the downloads page. Zero down-time mod is documented here.

New 13/03A Users
Many of the mods documented throughout the forum are now included in 13/03A. As far as possible, I have preserved line numbers so that if you wish to implement additional changes in most cases you will be able to locate the original code. However, if this is not the case, please post a reply to the relevant thread to request updated instructions for the latest distribution.

Enjoy!

Cheers,
David
--
PriceTapestry.com

Submitted by GPR on Wed, 2013-03-06 08:37

Hi David

This arrived just in the nick of time - I am just starting the process of modifying my PT, so will start over with the new script :)

Is there a change log or similar that documents which mods from the forum have been built in?

Cheers
GPR

Submitted by support on Wed, 2013-03-06 09:56

Hi GPR,

Core feature changelog is here, otherwise it's more minor changes such as magic quotes setting detection on form input - if you're not sure about any mods or have changes you've made to the previous distribution and would like to port forward just let me know...

Cheers,
David.
--
PriceTapestry.com

Submitted by GPR on Wed, 2013-03-06 10:27

Sorry, should have been able to find that myself.

I've only incorporated a couple of minor changes so far, just useful things I spotted while educating myself on various aspects of PT from the forum; specifically scrolling through records at registration (www.pricetapestry.com/node/4956) and editing of existing registration (www.pricetapestry.com/node/2843). Are mods of this nature now built in?

I must admit one of the challenges of adopting PT is the sheer quantity of useful mods as sometimes the threads they are on are quite old and it is not immediately clear if the particular mod is still the best way of achieving something or if it is now redundant :)

Submitted by support on Wed, 2013-03-06 11:21

Hi,

Neither of those particular mods are included, but are still valid (save for a single line number change in one instance that I have updated).

Thanks for your comments - the feedback is appreciated. I am acutely aware that the scope of the forum, whilst a great resource for users may be in need of some re-organisation. I will look into this, for example sorting threads by setup or mods etc.

Cheers,
David.
--
PriceTapestry.com

Submitted by erv on Thu, 2013-03-07 09:06

Hi David,

could you explain the "Improved indexing strategy" - i guess this would also be applicable to existing installations?

thanks
erv

Submitted by support on Thu, 2013-03-07 09:26

Hello erv,

Sure - previously there were 2 inefficiencies in the search code. Firstly, all the required fields for search results display were included in the selection; meaning that should a temporary table have been required the size would be much larger than necessary, and subsequently the sort slower than necessary. Secondly, since the search queries contain a price summary element (e.g. MIN(price) as minPrice) this restricted the index options available to the database.

In 13/03A, there are product name, merchant, category and brand indexes which are combined with price, and therefore can be used by the search query. Furthermore, only the minimum fields required to get the results are included. Once the result set is returned, the remaining fields are re-queried, which is extremely fast! So even though it involves an additional query, overall it is quicker and much less processor intensive.

Unfortunately because the changes are quite significant it's not easy to provide a patch or describe the changes but I would be happy to do that for you. If you would like to email me your existing search.php I'll merge the required changes with your current version. Note that I will include a dbmod script in the reply which will truncate the products table before creating the new indexes so let me know if that is likely to cause any problems (for example if you're using an update instead of delete / insert mod and wish to preserve accumulated data in the products table)

Cheers,
David.
--
PriceTapestry.com

Submitted by Bakalinge on Thu, 2013-03-07 15:27

Hi David,

Can I just upgrade search.php replacing the old file (v 12/10B) with the new one ?

Thanks

Bak

Submitted by support on Thu, 2013-03-07 15:55

Hi Bak,

You could - but you'll still need the dbmod.php (which will TRUNCATE the products table so a full import will be required afterwards) - if you would like to forward your current version and I'll patch / reply with the dbmod script for you, no problem!

Cheers,
David.
--
PriceTapestry.com

Submitted by DVDAFFAIRES on Tue, 2013-03-12 20:16

Hello David,

When doing a search, the url is no longer rewrited?
There is no rewrite in the htaccess file.

Cheer
Raoul

Submitted by DVDAFFAIRES on Tue, 2013-03-12 21:17

Hello David,

I replaced the file admin/merchant_logos.php line No. 60 by that of the old version because the logos did not appear (the admin).
On the public site, no problem.
Only logos with only a single word was seen.
If the merchant name contains more than one word (word1 word2), the logo disappears and is Replaced by the [alt].

// print "<td><img style='padding:10px;' src='".$config_baseHREF."logos/".urlencode($row["merchant"])."' alt='".htmlspecialchars($row["merchant"])." Logo' /></td>";
print "<td><img style='padding:10px;' src='".$config_baseHREF."logos/".$row["merchant"]."' /></td>";

Cheer
Raoul

Submitted by support on Tue, 2013-03-12 21:34

Hello Raoul,

Thanks for letting me know - I did have that handled correctly but accidentally became reverted - will correct in the distribution.

The distribution never actually had /search/keywords rewriting so that sounds like it would have been added via a previous mod that you had made... There are a number of rewrite mods on the forum but all quite specific, so what I think would be the easiest thing to do if you're not sure would be to email me your previous search.php and .htaccess and I'll describe the exact changes for you in the 13/03A.

Cheers!
David.
--
PriceTapestry.com

Submitted by Fuzzy on Sun, 2013-05-26 11:56

Hi David, thanks for the update!

I have tried upgrading a number of times though I am getting a few issues.

Most importantly, the Automation tool is no longer is writeable and it gives me this message: ERROR - DIRECTORY NOT WRITABLE

With Debug mode on I get:

SELECT * FROM `xxpt_jobs` ORDER BY directory,filename][Unknown column 'directory' in 'order clause']
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /xxxx/xxxx/xxxx/data/includes/database.php on line 27

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /xxxx/xxxx/xxxx/data/includes/database.php on line 32

As far as I can see it is something to do with this line in automation.php:

$directoryVar = "config_".$job["directory"]."Directory";

I have added the column in manually via phpmyadmin which removes the error message, unfortunately the feeds dir is still not writable.

Regards

Aaron.

Submitted by support on Sun, 2013-05-26 15:45

Hello Aaron,

Apologies for the inconvenience, I'll double check the upgrade files, in the mean time, the following dbmod.php script will create the missing `directory` field on the jobs table which should get you up and running:

<?php
  
require("includes/common.php");
  
$sql "ALTER TABLE `".$config_databaseTablePrefix."jobs`
            ADD `directory` VARCHAR(255) NOT NULL default 'feed'"
;
  
database_queryModify($sql,$result);
  print 
"Done.";
?>

Upload and run once from the main Price Tapestry installation folder.

Cheers,
David.
--
PriceTapestry.com

Submitted by Fuzzy on Mon, 2013-05-27 00:05

Thanks David, that fixed it.

Submitted by Fuzzy on Mon, 2013-05-27 02:06

Spoke to soon, though almost there:

On my products page I have this error message:

SELECT DISTINCT(name),MATCH name AGAINST ('8 Kg Fisher Paykel Washing Machine WL80T65CW2') AS relevance FROM `sspt_products` IGNORE INDEX (name_2) WHERE name <> '8 Kg Fisher Paykel Washing Machine WL80T65CW2' AND brand = 'Fisher Paykel' ORDER BY relevance DESC LIMIT 3][Can't find FULLTEXT index matching the column list]
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /xxxx/xxxx/xxxx/data/includes/database.php on line 27
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /xxxx/xxxx/xxxx/datax\/includes/database.php on line 32

$config_useFullText = TRUE; in my advanced config.

Submitted by support on Mon, 2013-05-27 08:45

Hi Fuzzy,

I'm not sure why the upgrade script has affected the original indexes but here's the dbmod.php to add the one described as missing by the above error;

<?php
  set_time_limit
(0);
  require(
"includes/common.php");
  
$sql "CREATE FULLTEXT INDEX name_ft ON `".$config_databaseTablePrefix."products` (name)";
  
database_queryModify($sql,$result);
  print 
"Done.";
?>

Cheers,
David.
--
PriceTapestry.com

Submitted by Fuzzy on Mon, 2013-05-27 11:51

Thanks David, I am not sure what the issue is though I have tried this upgrade on two separate servers as well as locally. The database tables don't appear to be installing even with a fresh install.

After adding that dbmod to the database I get the same error:

[SELECT DISTINCT(name),MATCH name AGAINST ('100 Silk Mystic Kaftan') AS relevance FROM `pt_products` IGNORE INDEX (name_2) WHERE name <> '100% Silk Mystic Kaftan' AND brand = 'Honey Beau' ORDER BY relevance DESC LIMIT 3][Can't find FULLTEXT index matching the column list]
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /xxxx/data/includes/database.php on line 27
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /xxxx/data/includes/database.php on line 32
Warning: Cannot modify header information - headers already sent by (output started at /xxxx/data/includes/database.php:22) in /xxxx/data/html/header.php on line 6

Submitted by support on Mon, 2013-05-27 12:45

Hi Fuzzy,

Could you confirm which upgrade .zip file you are using (e.g. AdminUpgrade_From_1210B.zip etc.)?

Or, did you mean that you are trying to install a clean copy of 13/03A (so not an upgrade) and the database tables are not being installed? (if this is the case, from setup.php if you click the link "Click here to install tables", it returns to the page with the same link displayed (e.g. tables uninstalled)?

Thanks,
David.
--
PriceTapestry.com

Submitted by Fuzzy on Tue, 2013-05-28 01:11

Thanks David, I tried both ways. I couldn't get the upgrade to work without causing issues though I managed to get a clean install working. After the new install importing my old data using the database tool appears to have worked.

Its possibly related, but with price tapestry I need to keep hitting F5 to refresh any changes as they are not displayed immediately eg:

When importing a feed, I need to force refresh the browser to see if it has imported. This phenomena is also true when installing the database tables which possibly brought me undone.

I am not sure how to fix this as setting the browser to not cache doesn't fix this at all. As I am using the WP plugin, this issue does not affect Wordpress at all.

Thanks for all the help.

Submitted by support on Tue, 2013-05-28 09:42

Hi Fuzzy,

Glad you're up and running!

The situation you describe regarding having to refresh the /admin/ home page to see when import has finished is quite a rare situation and I think is indicative of a proxy server (possibly at your ISP) between you and your web server that is timing out on the connection but NOT closing it!

This is actually a "good thing" as it means your web server itself isn't being time limited for HTTP requests, otherwise you would see the more usual symptoms of max_execution_time being reached such as the PHP error itself (PHP imposed limit) or Internal Server Error (Apache imposed limit).

Ideally however, if you are working with large feeds then then it's always best to import from the command line using import.php having initially used Register and Trial Import via the /admin/ area....

Cheers,
David.
--
PriceTapestry.com

Submitted by allanch on Fri, 2013-06-07 07:18

Hi David,

I'm looking to do an upgrade to this latest release. Can you tell me if the sidebar checkbox and reviews products merge mods in the download section of 12/10 are this valid for this release? Thanks.

Submitted by support on Fri, 2013-06-07 08:45

Hello Allan,

I'll make 13/03A versions of those mods today and post / forward them for you...

Cheers,
David.
--
PriceTapestry.com