You are here:  » Category and Brand infopages


Category and Brand infopages

Submitted by paullas on Wed, 2013-04-03 22:48 in

Hi

Is it possible to do what you have mentioned here http://www.pricetapestry.com/node/3237 on the WP verions

thanks

paul

Submitted by support on Thu, 2013-04-04 07:50

Hi Paul,

Sure - first create the 2 folders and a couple of initial category / brand info .html pages in the Price Tapestry installation folder, just as per the other thread, so you will have

/pt/category_info/Category Name.html
/pt/brand_info/Brand Name.html

(assuming Price Tapestry installed in /pt/, adjust as required otherwise)

Then in pto_search.php, look for the following code at line 331:

  $html .= pto_search_html();

...and REPLACE with:

  global $pto_config_externalPath;
  if (($parts[0] == "category")||($parts[0] == "brand"))
  {
    $filename = $pto_config_externalPath.$parts[0]."_info/".$parts[1].".html";
    if (file_exists($filename))
    {
      $html .= file_get_contents($filename);
    }
  }
  $html .= pto_search_html();

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by paullas on Sat, 2013-04-06 12:21

Hi David

My pt install is int /pt/

I have created the folder below and made a file called Beanbags.html:

/pt/info_category/Beanbags.html

But nothing is showing up when i goto the category page Beanbags?

thanks

pual

Submitted by support on Sun, 2013-04-07 08:24

Hi Paul,

The code is currently looking for category_info rather than into_category, so if you create your file as

/pt/category_info/Beanbags.html

...that should be all it is...

Cheers,
David.
--
PriceTapestry.com

Submitted by paullas on Sun, 2013-04-07 12:01

Hi

renamed the 2 categories but still no joy.

{links saved}

thanks

Paul

Submitted by support on Mon, 2013-04-08 07:03

Hi Paul,

It looks like the plugin setting for Install Path is not correct (wp-admin > Settings > PriceTapestry.org) is either empty or incorrect, as I notice that whilst you do have merchant logos in place, they are not working either - which also rely on the Install Path setting.

Check that it matches exactly the value shown on the Support Info page of your /pt/admin/ area, and that should be all it is...

Cheers,
David.
--
PriceTapestry.com

Submitted by babyuniverse on Sat, 2013-05-04 23:29

Will this also work with Merchants?

Submitted by support on Sun, 2013-05-05 07:15

Hi babyuniverse,

Sure! Have a go with:

  global $pto_config_externalPath;
  if (($parts[0] == "category")||($parts[0] == "brand")||($parts[0] == "merchant"))
  {
    $filename = $pto_config_externalPath.$parts[0]."_info/".$parts[1].".html";
    if (file_exists($filename))
    {
      $html .= file_get_contents($filename);
    }
  }
  $html .= pto_search_html();

And then create your /pt/merchant_info/ folder (assuming Price Tapestry installation in /pt/) and then create your "Merchant Name.html" files there!

Cheers,
David.
--
PriceTapestry.com