You are here:  » BETA3 for WordPress now available


BETA3 for WordPress now available

Submitted by support on Wed, 2011-10-26 10:48 in

Hi everyone,

BETA3 for WordPress is now available to download.

Fixes and additional features as follows:

- Canonical header tags generated for dynamically generated pages

- Any products table database field (such as custom fields added as described here) can be included in Product/Main and Prices/Each HTML templates using placeholder %DB_fieldname% [more info]

- Price/Currency reverse order placeholder %PRICER% can be used as an alternative to %PRICE% [more info]

- Advanced configuration section added with wp_head Remove Actions setting, a mechanism to disable 3rd party plugin and theme generated headers that conflict with or overwrite the PriceTapestry.org generated headers on dynamically generated pages [more info]

- Sort order added to search results page titles if not default to ensure unique titles for every search results page

To upgrade, simply upload the new pto/ folder over the top of the existing installation and all existing settings and changes made to the HTML templates will be preserved.

Please follow up in this thread with any issues noticed relating to BETA3 and I'll establish a separate update thread if any changes are published prior to a 1.0 release. Updated documentation to cover the above will follow shortly with further details if required.

Enjoy!

Cheers,
David.
--
PriceTapestry.com

Submitted by fstore on Thu, 2011-10-27 09:33

David
Just upgraded from BETA2 to BETA3 without any issue. It looks great looking forward to the doco.

One thing I wanted to asked you about making "/shopping/" page as home page in workpress.
"/shopping/" as home page doesn't work because when click on the feature product, it keep you on the same page instead of taking you to product page.

It only works when created as separate page. In my case I already have home page which display feature products but still have to create a separate /shopping/ page.

Is it possible to keep just one page?

My Container Permalink = example.com/shopping (with [pto] shortcode)

I am not sure if I am making myself clear, so please see my site {link saved}, you will see two tabs "Home" and "Shopping". Is is possible to remove one and just keep one?

Regards
Hassan

Submitted by support on Thu, 2011-10-27 10:35

Hi Hassan,

The /shopping page needs to exist as it is the host for the dynamically generated pages (e.g. /product/) however you can hide it from the menu using this plugin.

Then, if you want the main search box and browse links at the top level all you need to do is have post or page that is permanently displayed as your home page containing the [pto] shortcode.

Hope this helps!
Cheers,
David.

Submitted by kempo on Thu, 2011-10-27 15:05

Hi David,
I also upgraded to BETA3 without any issue and especially I would like to thank you for %PRICER% modification.
Great Job!
Cheers,
kempo

Submitted by marco@flapper on Fri, 2011-11-04 21:09

Hi,
I had some character interpretation problems so you adviced me to turn utf8 to utf-8 in wp.config.php.

That solved the characters, but when I want to create a new blog in Wordpress multisite I get a database error. It seems like Wordpress only accepts utf8 in the wp-config.php.

Is there another solution for the character issue?

Submitted by marco@flapper on Sat, 2011-11-05 12:00

Hi,
Feedback on multisite. You can click on Generate Defaults File to export your settings as a custom pto_default.php file, replacing the file of the same name from the plugin distribution on additional installations.

But when you do a upgrade on Wordpress multisite it deactivates all the plugins and reactivates them. That results in that all the websites using the PTO plugin have the same settings and specific settings you made in the HTML are lost. Also the Base HREF and Install Path that are specific for your website are set to the one setting in the pto_default.php file.

Which makes updating Wordpress a little bit difficult.

Submitted by support on Sat, 2011-11-05 12:38

Hi Marco,

Thanks for the above comments. I will investigate the character set setting in more detail; it's obviously intended to be utf8 within wp-config.php so I'll check whether an alternative encoding function should be used.

Re-upgrading deactivating and re-activating all plugins, one solution I think would be to modify the install (activate) and uninstall (deactive) functions in pto.php so that settings are only deleted on uninstall, and created on install IF pto_default.php exists. So, once you have set-up your master settings and created a master pto_default.php, after activating the plugin for the first time you can then delete pto_default.php which will have the effect of preserving setting across any de-activate re-active cycle.

To try this, look for the following code beginning at line 31 of pto.php:

function pto_install()
{
  require("pto_default.php");
  global $pto_settings_config;
  global $pto_settings_html;
  foreach($pto_settings_config as $setting)
  {
    $default = str_replace("pto_","pto_default_",$setting);
    add_option($setting,$$default);
  }
  foreach($pto_settings_html as $setting)
  {
    $default = str_replace("pto_","pto_default_",$setting);
    add_option($setting,trim($$default));
  }
}
register_activation_hook(__FILE__, 'pto_install');
function pto_uninstall()
{
  global $pto_settings_config;
  global $pto_settings_html;
  foreach($pto_settings_config as $setting)
  {
    delete_option($setting);
  }
  foreach($pto_settings_html as $setting)
  {
    delete_option($setting);
  }
}
register_deactivation_hook(__FILE__, 'pto_uninstall');

...and REPLACE with:

function pto_install()
{
  if (file_exists("pto_default.php"))
  {
  require("pto_default.php");
  global $pto_settings_config;
  global $pto_settings_html;
  foreach($pto_settings_config as $setting)
  {
    $default = str_replace("pto_","pto_default_",$setting);
    add_option($setting,$$default);
  }
  foreach($pto_settings_html as $setting)
  {
    $default = str_replace("pto_","pto_default_",$setting);
    add_option($setting,trim($$default));
  }
  }
}
register_activation_hook(__FILE__, 'pto_install');
function pto_uninstall()
{
  if (file_exists("pto_default.php"))
  {
  global $pto_settings_config;
  global $pto_settings_html;
  foreach($pto_settings_config as $setting)
  {
    delete_option($setting);
  }
  foreach($pto_settings_html as $setting)
  {
    delete_option($setting);
  }
  }
}
register_deactivation_hook(__FILE__, 'pto_uninstall');

Regarding Base HREF and Install Path needing to be different; I'm not sure if you will have yet seen the documentation page regarding placeholders that have been added to assist with MU installation. The details are on this page adding support for the %MU_ID% placeholder in certain configuration variables - apologies if you're already aware of this feature and I have mis-understood; please feel free to drop me an email with any links to MU installations that are not working properly and I'll take a look right away;

Hope this helps
Cheers,
David

Submitted by marco@flapper on Sun, 2011-11-06 08:34

The modified pto.php Gives 500 error for whole site. Could you take a look at the code?

PS: Thanks for the %MU_ID% placeholder. I missed that.

Submitted by support on Sun, 2011-11-06 09:32

Hi Marco,

The changes worked OK on my test server - double check that the code isn't duplicated at all; if you're still not sure if you could email me your modified version I'll check it out..

Cheers,
David.

Submitted by marco@flapper on Sun, 2011-11-06 11:50

Hi,
It works. I network deactivated it and reactivated it and the settings were preserved.

Submitted by marco@flapper on Wed, 2011-11-09 08:28

Hi,
Did you find an alternative encoding function for the character set function?

Submitted by marco@flapper on Wed, 2011-11-09 10:55

Hi,
My plugin category page just dissappeared while the pt category page is still there. The strange thing is that a specific category does show and that it works on another site on my multisite.

Submitted by support on Wed, 2011-11-09 11:34

Hi Marco,

I'm investigating the character encoding issue at the moment. On the installation where the category A-Z is not showing (http://www.example.org/bestemming/) can you let me know the container permalinks (e.g. http://www.example.org/shopping/) and I'll check it out further...

Thanks,
David.

Submitted by marco@flapper on Wed, 2011-11-09 11:45

{link saved}

Submitted by support on Wed, 2011-11-09 12:01

Hi Marco,

That's very strange! Please could you look for the following code at line 45 of pto_atoz.php

  $afterI = 0;

...and REPLACE with

  $html .= "[".$sql."]";
  $afterI = 0;

...and let me know when that is online, then I can review the SQL that is being generated to try and understand why it is any different to the merchant / brand A-Z pages which are still working...

Thanks,
David.

Submitted by marco@flapper on Wed, 2011-11-09 12:50

I got an 500 error when I replaced the code. So I put the original code back.

Submitted by support on Wed, 2011-11-09 13:12

Sorry Marco,

There was a superfluous quote character in the replacement, i've corrected above...

Cheers,
David.