You are here:  » Few questions after installation and setting


Few questions after installation and setting

Submitted by JanezJans on Thu, 2017-03-23 20:56 in

Hi,

I have installed and imported few feeds from various stores.

I have few questions so hopefully you can help me David.

Site in question is {link saved} and I am slowly setting things from Price Tapestry until making it main content {link saved}

1. When I search for product on {link saved} I don't see filter results option like when I do it on {link saved}

I mean the menu below search where you can choose merchant, category, brand, price range.

Why is that?

2. Why are there no breadcrumbs (navigation) like back to search or something?

3. How can I add space between store, product name and price? And related products and description near related products?

{link saved}

4. I have products like:
Dying Light CD Key For Steam
Dying Light STEAM CD-KEY GLOBAL
Dying Light CD-Key
et.

It shows them as different products but I need them under same name. I have many products like that and would like to make some global parametar that automatically puts all products ,for example Dying Light, under same product for comparison.

I have tried Product Mapping and Product Mapping RegExp but I didn't succeed.

I don't quite understand how it goes even after reading documentation. I think Product Mapping RegExp is what I need but that I don't understand it at all.

Any help is welcome. Thanks

Submitted by support on Fri, 2017-03-24 12:18

Hello Janez and welcome to the forum!

> 1. When I search for product on {link saved} I don't see filter
> results option like when I do it on {link saved}
> I mean the menu below search where you can choose merchant,
> category, brand, price range. Why is that?

Search Filters are implemented as a widget in the plugins to give greater flexibility over their location on the page. For WordPress, go to /wp-admin/ > Appearance > Widgets, and drag the "PriceTapestry.org Search Filters" widget to a suitable widget container location in your theme.

> 2. Why are there no breadcrumbs (navigation) like back to search
> or something?

Standalone Price Tapestry is currently a distribution ahead of the plugins, I am currently working on the next update to PriceTapestry.org for WordPress for which I am aiming to re-launch beta testing early next month (you can register for beta testing here) and this will include breadcrumbs and support for category hierarchy.

> 3. How can I add space between store, product name and price?
> And related products and description near related products?

Part of the next update to PriceTapestry.org for WordPress is a fully responsive (mobile friendly) template set and this is available now! See the following page for more details and download link.

New: Responsive (Mobile Friendly) Templates and CSS

Everything should then be nicely spaced regardless of any style inheritance from the main WordPress theme, but it is new so if any layout problems at all after installation let me know and I'll check it out further with you..

> 4. I have products like:
> Dying Light CD Key For Steam
> Dying Light STEAM CD-KEY GLOBAL
> Dying Light CD-Key
> et.
> It shows them as different products but I need them under same name.
> I have many products like that and would like to make some global
> parametar that automatically puts all products ,for example Dying Light,
> under same product for comparison.

Basic Product Mapping is probably the more appropriate here, Product Mapping by RegExp is more suited to mapping by model numbers where manufacturer model numbers follow a set pattern. In this example for basic Product Mapping, from /price/admin/ go to Data Management > Product Mapping and create a new Product Mapping entry with your preferred name for this product, e.g. "Dying Light CD Key". Then, on the configuration page for the mapping you have two options;

i) If you wish everything in the database containing "Dying Light" to be mapped together, simply enter those keywords alone in the Alternatives box and the mapping will be applied as a keyword match.

ii) Alternatively, if that is not the case then you can use =Exact Match entries in the Alternatives box, so in this case;

=Dying Light CD Key For Steam
=Dying Light STEAM CD-KEY GLOBAL
=Dying Light CD-Key

Whichever you choose, click Save, and then re-import all feeds and you will then find that you have just the one product page for "Dying Light CD Key" comparing all merchants...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by JanezJans on Fri, 2017-03-24 19:22

Thank you for your reply.

1. Widgets mostly can be used in sidebars unless maybe supported by page builder like Visual Composer.

So do widgets have shortcodes via which they can be implemented to post and pages or I need to use plugin like "amr shortcode any widget" to get it working?

2. Ok will try to make something for now as it currently there is no way to return to search form.

4. If I understood correctly this would mean manual mapping for more than thousand products.
As I have many products which have same issue.

Like PRODUCT NAME CD Key For Steam
PRODUCT NAME STEAM CD-KEY GLOBAL
PRODUCT NAME CD-Key
PRODUCT NAME Origin Key

Is there a way I can set that system recognizes PRODUCT NAME for all products and sets them under same product no matter what goes after. Hope I explained it well.

Submitted by support on Sat, 2017-03-25 12:50

Hi,

> 1. Widgets mostly can be used in sidebars unless maybe supported
> by page builder like Visual Composer.
> So do widgets have shortcodes via which they can be implemented
> to post and pages or I need to use plugin like "amr shortcode
> any widget" to get it working?

It's actually a simple modification to show the filters above the search results area (just as in standalone Price Tapestry) - to do this, edit the plugin file pto/pto_search.php and look for the following code at line 387:

      $html .= pto_search_banner();

...and REPLACE with:

      $html .= pto_search_banner();
      $html .= pto_search_filters_html();

Bear in mind that the Search Filters Widget is intended for vertical display so you may want to modify the template (wp-admin > Settings > PriceTapestry.org) to suit horizontal display - i'll work out a suitable template on Monday and update this post.

> 4. If I understood correctly this would mean manual mapping
> for more than thousand products. As I have many products
> which have same issue.
> PRODUCT NAME CD Key For Steam
> PRODUCT NAME STEAM CD-KEY GLOBAL
> PRODUCT NAME CD-Key
> PRODUCT NAME Origin Key
> Is there a way I can set that system recognizes PRODUCT NAME
> for all products and sets them under same product no matter
> what goes after. Hope I explained it well.

I've just done some testing and yes - there is an opportunity to use Product Mapping by RegExp here.

From your Price Tapestry /admin/ area, go to Data Management > Product Mapping RegExp and enter a name for the new mapping for example "Games1" (this isn't a product name at all, just something to identify the mapping by). On the configuration page for the new mapping, under the Settings section enter the RegExp as follows:

/(.*)(CD Key For Steam|STEAM CD\-KEY GLOBAL|CD\-Key|Origin Key)/

And for Product Name:

$1

If you have hundreds of products likely to match this expression don't use the Test function at this point, just click Save and then run a full import - and you should find the products nicely mapped together and compared.

$1 as the product name refers to the first bracketed sub-expression, in this case .* which matches anything, but only when followed by one of the strings in the second bracketed expression. The expression is a pipe-separated list, and note that where the string contains a hyphen as in "CD-Key" the hyphen must be "escaped" with backslash e.g. "CD\-Key" since hyphen has a special meaning within a regular expression...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by JanezJans on Sat, 2017-03-25 18:50

> 1. I have edited and widget is indeed now visible but I don't know
> how to set it to suit horizontal display. Also is it possible that
> widget is always visible even before performing search?
> And can search box and widget be always visible on every page even
> when comparing prices, reviewing product etc.?

Sure, this is essentially re-purposing the search filters widget as an "Advanced" search form and used in place of the basic search form. I'm just building a new development server today and as soon as everything is up and running I'll work out the changes for this and the horizontal layout. I'll update this post later today with the new template and mods for it to show on all pages...

> 4. If I use caching plugin on website do I need to set shorter
> caching time interval so that visitors see updated prices?

Yes - the cache period should be no more than the frequency with with which you update prices (e.g. when cron.php is scheduled to run)

Regarding the data source, the script does require a CSV or XML format feed for each merchant. Where a merchant that you would like to feature on your site does not currently provide a feed it is often worth getting in touch to see if a feed can be made available - most ecommerce platforms have export functionality and also bear in mind that some affiliate networks offer a commission for merchant introduction so if any of the networks you work offer such a program that might be something to consider...

Hope this helps!
Cheers,
David

Submitted by JanezJans on Sun, 2017-03-26 21:38

Also how can I make images smaller. One size for all. It seems from some stores there are just to big. I need one size for product, featured, search images.

{link saved}

Submitted by support on Mon, 2017-03-27 09:57

Sure, based on the updated responsive templates and CSS which I think you have installed; if you edit the plugin file pto/resources/pto.css and for Featured Products look for the following class definition beginning at line 33:

.pto_fp img {
  width: 80% !important;
}

...and REPLACE with:

.pto_fp img {
  height: 100px !important;
}

For search results look for the following class definition beginning at line 46:

.pto_sr {
}

...and REPLACE with:

.pto_sr img {
  height: 100px !important;
}

And for the main product image, look for the following class definition beginning at line 71:

.pto_pm {
}

...and REPLACE with:

.pto_pm {
}
.pto_pm-img {
  height: 100px !important;
}

The above examples will fix the image size by height to 100 pixels in each case, adjust as required or alternatively fix by width if that would better suit the kind of image dimensions returned by your merchants - bear in mind when sizing images only width or height should be fixed to avoid distortion.

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by support on Mon, 2017-03-27 14:11

Hi,

Regarding combining the functionality of Search Filters / Advanced Search functionality, I just wanted to take this a step at a time if that would be OK as I've just worked out a minimum modification to re-purpose the Search Filters Widget as the main search form / filters visible on every page of your site, whether generated by PriceTapestry.org or not.

To try this approach, first go to /wp-admin/ > Settings > PriceTapestry.org and scroll down to the Main / Search Form widget, and DELETE the contents leaving that template empty.

Then scroll down to the Main / Search Filters Widget template and REPLACE with:

<div class='pto_sf'>
<form method='GET' action='%ACTION%'>
Keywords:
<input type='text' name='pto_q' value='%PTO_Q%' />
%IF_MERCHANTS%
Merchant:<br />
<select name='pto_merchantFilter'>
  <option value=''>All</option>
  %MERCHANTS%
</select>
<br />
%ENDIF_MERCHANTS%
%IF_CATEGORIES%
Category:<br />
<select name='pto_categoryFilter'>
  <option value=''>All</option>
  %CATEGORIES%
</select>
<br />
%ENDIF_CATEGORIES%
%IF_BRANDS%
Brand:<br />
<select name='pto_brandFilter'>
  <option value=''>All</option>
  %BRANDS%
</select>
<br />
%ENDIF_BRANDS%
Price:<br />
%PTO_CURR%&nbsp;<input type='text' class='pto_sf_price' name='pto_minPrice' value='%PTO_MINPRICE%' />
to
%PTO_CURR%&nbsp;<input type='text' class='pto_sf_price' name='pto_maxPrice' value='%PTO_MAXPRICE%' />
<br /><br />
<input type='submit' value='Search' />
 or browse by <a href='%MERCHANTBASEHREF%'>merchant</a>, <a href='%CATEGORYBASEHREF%'>category</a> or <a href='%BRANDBASEHREF%'>brand</a>
</form>
</div>

Next, edit the plugin file pto/resources/pto.css and look for the following style definitions beginning at line 5:

.pto_sf select {
  width: 100%;
}
.pto_sf input {
  width: 30%;
}

...and REPLACE with:

.pto_sf select,.pto_sf input {
  width: 100%;
}
.pto_sf_price {
  width: 30% !important;
}

Next, edit the plugin file pto/pto.php and look for the following code at line 159:

  $pto_q = (isset($pto_q)?pto_common_normalise(urldecode($pto_q),":\."):"");

...and REPLACE with:

  $pto_q = (isset($pto_q)?pto_common_normalise(urldecode($pto_q),":\."):"");
  if (!$pto_q && isset($_GET["pto_merchantFilter"])) $pto_q = "bw:";

Next, edit the plugin file pto/pto_search.php and look for the following code at line 915:

  $html = str_replace("%PTO_Q%",$pto_q,$html);

...and REPLACE with:

  global $pto_config_merchantBaseHREF;
  global $pto_config_categoryBaseHREF;
  global $pto_config_brandBaseHREF;
  if ($pto_q != "bw:")
  {
    $html = str_replace("%PTO_Q%",$pto_q,$html);
  }
  else
  {
    $html = str_replace("%PTO_Q%","",$html);
  }
  $html = str_replace("%MERCHANTBASEHREF%",get_bloginfo('url').$pto_config_merchantBaseHREF,$html);
  $html = str_replace("%CATEGORYBASEHREF%",get_bloginfo('url').$pto_config_categoryBaseHREF,$html);
  $html = str_replace("%BRANDBASEHREF%",get_bloginfo('url').$pto_config_brandBaseHREF,$html);

And finally the following code at (now) line 1023:

    global $pto_searchWhere;
    if (!isset($pto_searchWhere)) return;
    if ("/".$pagename != $pto_config_permalink) return;

...and REPLACE with:

    global $pto_searchWhere;
    global $pto_q;
    if (!$pto_searchWhere)
    {
      $pto_q = "bw:";
      pto_search_buildWhere();
    }

Additionally, from /wp-admin/ > Appearance > Widgets, make sure that you are not using the PriceTapestry.org Search widget and only have an instance of PriceTapestry.org Search Filters widget in a suitable widget area in your theme, giving the widget an appropriate title such as "Game Search" or as required.

If you'd rather not use widgets at all and simply have the Search Filters Widget displayed at the top of all PriceTapestry.org generated pages, and in a fluid layout suitable for horizontal display, let me know and I'll work that out further for you...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by JanezJans on Mon, 2017-03-27 15:58

Thanks this seems to do the trick.

Also in last step I guess you wanted to say that

.pto_pm {
}

is replaced with

.pto_pm-img {
  height: 100px !important;
}

Submitted by JanezJans on Mon, 2017-03-27 16:03

Yes that is what I meant. I want to have Search + Search Filters at the top of all PriceTapestry.org generated page.

And would like it looks nice. This is great example from your demo page {link saved}

I have applied your current code but not sure what I exactly gained. There is no more search form visible unless I put widget which can be put only in sidebar in case of my theme.

Submitted by JanezJans on Mon, 2017-03-27 16:10

Also wanted to ask is it possible to use one image like my website logo or something which can be used for all products which dont have image after import.

By this I mean just as featured image in search results, featured product, related products, etc.

I dont need that image is applied to same product from each store.

And thanks for all help

Submitted by JanezJans on Mon, 2017-03-27 16:24

Also I would like to remove "Review This Product" when featured products are displayed.

Submitted by support on Mon, 2017-03-27 16:27

Hi,

> Thanks this seems to do the trick.
> Also in last step I guess you wanted to say that
> ...

Yes - corrected above!

I'll publish your other replies in this thread and follow up with mods in a single post just as soon as i've worked them through on my development server which will be first thing tomorrow now; giving you the advanced search form using the same (responsive) horizontal / collapsing nicely for mobile layout as the standalone demo site, and included without any widgets required...

Cheers,
David.
--
PriceTapestry.com

Submitted by support on Tue, 2017-03-28 10:40

Hi,

> Also I would like to remove "Review This Product" when featured
> products are displayed.

Edit pto/pto_featured.php and look for the following code at line 92:

        if ($pto_config_useInteraction)

...and REPLACE with:

        if (FALSE)

> Also wanted to ask is it possible to use one image like my website logo
> or something which can be used for all products which dont have image
> after import.
> By this I mean just as featured image in search results, featured
> product, related products, etc.
> I dont need that image is applied to same product from each store.

The easiest approach here is probably to add the Search and Replace RegExp filter to your Price Tapestry installation which you can find here.

With that in place, from your Price Tapestry /admin/ home page, click Global Filters and add a new Search and Replace RegExp filter to the Image URL field. In the Search box enter the expression:

^$

...which will match an empty field only, and in the Replace box, your required "no image" image e.g.;

http://www.example.com/logo.gif

> Yes that is what I meant. I want to have Search + Search Filters at the
> top of all PriceTapestry.org generated page.
> And would like it looks nice. This is great example from your demo page
> I have applied your current code but not sure what I exactly gained.
> There is no more search form visible unless I put widget which can
> be put only in sidebar in case of my theme.

Sure - i've worked out a nice responsive modification to the filters widget (now "Advanced" Search Form) suitable for horizontal display (collapsing to vertical for mobile devices) and it can be made to display above all PriceTapestry.org generated pages easily without the need for any widgets.

With the above modifications remaining in place, go to /wp-admin/ > Settings > PriceTapestry.org and scroll down to the HTML section and replace the Main / Search Filters Widget template as follows:

<div class='pto_sf'>
<form method='GET' action='%ACTION%'>
Keywords:
<input type='text' name='pto_q' value='%PTO_Q%' />
%IF_MERCHANTS%
<div class='pto_sf_f'>
Merchant:<br />
<select name='pto_merchantFilter'>
  <option value=''>All</option>
  %MERCHANTS%
</select>
</div>
%ENDIF_MERCHANTS%
%IF_CATEGORIES%
<div class='pto_sf_f'>
Category:<br />
<select name='pto_categoryFilter'>
  <option value=''>All</option>
  %CATEGORIES%
</select>
</div>
%ENDIF_CATEGORIES%
%IF_BRANDS%
<div class='pto_sf_f'>
Brand:<br />
<select name='pto_brandFilter'>
  <option value=''>All</option>
  %BRANDS%
</select>
</div>
%ENDIF_BRANDS%
<div class='pto_sf_f'>
Price:<br />
%PTO_CURR%&nbsp;<input type='text' class='pto_sf_price' name='pto_minPrice' value='%PTO_MINPRICE%' />
to
%PTO_CURR%&nbsp;<input type='text' class='pto_sf_price' name='pto_maxPrice' value='%PTO_MAXPRICE%' />
</div>
<input type='submit' value='Search' />
 or browse by <a href='%MERCHANTBASEHREF%'>merchant</a>, <a href='%CATEGORYBASEHREF%'>category</a> or <a href='%BRANDBASEHREF%'>brand</a>
</form>
</div>

Next, edit the plugin resource file pto/resources/pto.css and look for the pto_sf_price class definition beginning at around line 8:

.pto_sf_price {
  width: 30% !important;
}

...and REPLACE with:

.pto_sf_price {
  width: 30% !important;
}
.pto_sf_f {
  padding: 0 10px 10px 0;
  white-space: nowrap;
}
@media only screen and (max-width: 40em) {
  .pto_sf_f {
    width: 100%;
  }
}
@media only screen and (min-width:40.063em) {
  .pto_sf_f {
    width: 25%;
    float: left;
  }
}

Next, edit the plugin file pto/pto_search.php and look for the following code at line 246:

  $html = $pto_html_search_form;

...and REPLACE with:

  global $pto_searchWhere;
  if (!$pto_searchWhere)
  {
    $pto_q = "bw:";
    pto_search_buildWhere();
  }
  $html = pto_search_filters_html();
  return $html;

Next, edit the plugin file pto/pto.php and look for the following code at line 470:

    switch($pto_module)

...and REPLACE with:

    $html .= pto_search_form();
    switch($pto_module)

And finally the following code at (now) line 497:

        $html .= pto_search_form();
        $html .= pto_featured("");

...and REPLACE with just:

        $html .= pto_featured("");

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by support on Tue, 2017-03-28 15:27

Hi again,

I think there is quite a time difference between us so I just wanted to reply to your question 4 quickly in your last reply;

> 4. Is it normal that whenever I click in my Price Tapestry
> (one that is not on WordPress) on compare prices or any
> other link it just redirects to 404 page?
> https://www.example.com/price/

This is just because the standalone Price Tapestry installation has search engine friendly URLs configured ($config_useRewrite = TRUE in config.php) but the corresponding .htaccess file is not in place. For the links to work you need to create the file:

https://www.example.com/price/.htaccess

...based on a copy of htaccess.txt in the distribution, but because Price Tapestry is installed in a sub-directory the RewriteBase must be set to /price/ in your case.

The easiest way would be to edit htaccess.txt and look for the following code at line 5

RewriteBase /

...and REPLACE with:

RewriteBase /price/

Upload to your server, and then using your FTP program, in the remote window, right-click on htaccess.txt and use the Rename function to change the filename to .htaccess

You can check that .htaccess is in place correctly by browsing to;

https://www.example.com/price/setup.php

...which will display a warning if .htaccess is not found when $config_useRewrite is set to TRUE...

Cheers,
David.
--
PriceTapestry.com

Submitted by JanezJans on Tue, 2017-03-28 16:13

Thanks. That solve it. Links are working now.

Submitted by support on Wed, 2017-03-29 09:36

Hi Janez,

> 2. I have done as instructed for putting image where there is none.
> Then I imported all products to see if worked but now there are no
> images at all.
> I have uploaded desired image as usual to my WordPress site and took
> URL link and put it in Replace box.
> I used this URL {link saved}
> Was I supposed to do it differently?

My apologies, the Search expression (the RegExp) needs to be:

/^$/

...in order to match an empty value only...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by JanezJans on Wed, 2017-03-29 10:58

Also when I perform search on my site

Example {link saved}

Two search forms are shown

Submitted by support on Wed, 2017-03-29 16:26

Hi Janez,

> Also when I perform search on my site
> Example {link saved}
> Two search forms are shown

I just wanted to follow up to this post quickly - it is because of the modification described above in this reply having now been superseded by the changes to show the new "Advanced" search form on all plugin generated pages, so where you now have in the plugin file pto/pto_search.php at line 387:

      $html .= pto_search_banner();
      $html .= pto_search_filters_html();

...REPLACE with the original code of just;

      $html .= pto_search_banner();

Cheers,
David.
--
PriceTapestry.com

Submitted by support on Thu, 2017-03-30 08:10

Hi Janez,

> Excellent. It works now. But that image is larger than others.
> How can I make it the same size as other featured images?

That's strange as it should be styled identically to merchant images via the changes made to the CSS described above. If you could double check that it's not a caching issue (CTRL+F5 will normally force a refresh of all resources) and if still not styled as per feed images if you could let me know an example page showing a combination of merchant and your "no image" image I'll take a look for you...

> Also when I upload merchant logos the images are shown too big.
> I tried uploading several sizes but it keeps showing same size
> no matter in what size I upload.

The replacement CSS that I know you are using doesn't actually size the merchant logo images so styling will be inherited from the main theme - to override, if you edit the plugin resource file pto/resources/pto.css; and for the Merchant A-Z look for the pto_az img class definintion at line 19:

.pto_az img {
  margin: 20px 0;
}

...and REPLACE with:

.pto_az img {
  margin: 20px 0;
  width: 100px !important;
}

For the price comparison table look for the pto_pp definition at line 93

.pto_pp img {
  margin: auto;
}

...and REPLACE with:

.pto_pp img {
  margin: auto;
  width: 100px !important;
}

> If I can add images where there is none. Would I be able to do
> same for description? For example if there is no description
> for that product that text which I put in replace is shown.
> Or even better maybe example: Compare prices for PRODUCT NAME
> and some more text
> In this case PRODUCT NAME would need to be title of product
> and by that changeable.

If it's the case that the cheapest merchant for a product has no description it's a simple mod to scan for a populated description and use that instead; to give this a go edit the plugin file pto/product.php and look for the following code at line 403:

    if ($product->description)

...and REPLACE with:

    foreach($pto_productResults as $p)
    {
      if (!$product->description && $p->description)
      {
        $product->description = $p->description;
      }
    }
    if ($product->description)

> On some related products
> example https://www.dynamitegaming.com/product/Fallout-4.html
> If you look related products last (at the bottom) just shows
> "from $ Compare Prices" but when you click on compare prices
> nothing is shown

Ah this is the case match issue in the way Related Products are derived, to account for this edit the plugin file pto/pto_product.php and look for the following code at line 240:

      $rows3[$row2->name] = $row2;

...and REPLACE with:

      $rows3[strtolower($row2->name)] = $row2;

And then the following code at line 245:

      $pto_searchResults[$k]->name = $rows3[$product->name]->name;

...and REPLACE with:

      $product->name = strtolower($product->name);
      $pto_searchResults[$k]->name = $rows3[$product->name]->name;

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by JanezJans on Thu, 2017-03-30 14:45

I looked today and it seems "no image" is same size as other featured images. Strange I don't have cache enabled and today looks good.

Merchant logos now display size as intended. Thanks.

Code to add description where there is none seems to do the trick.

The code for related products problem doesn't seem to help. It makes things even worse. After applying on all related products is displayed only "$ Compare Prices". No images, no title, nothing. When you click on "$ Compare Prices" it shows blank page (with only advanced search form).

I wanted to ask if I change image size in pto/pto.css do I need to import again images to changes take effect? And if having height can I set width also?

Like:

.pto_fp img {
  height: 150% !important;
  width: 80%;
}

I have one feed as json {link saved}

But when I go to add it Setup - Automation Tool and click Save Run after setting it doesnt recognizes it. Some error.

How can I get it work?

Submitted by support on Fri, 2017-03-31 09:14

> The code for related products problem doesn't seem to help. It makes things even worse.
> After applying on all related products is displayed only "$ Compare Prices".
> No images, no title, nothing. When you click on "$ Compare Prices" it
> shows blank page (with only advanced search form).

Ah, sorry about that - the second replacement (pto/pto_product.php line 245) was incorrect and should be just:

      $product->name = strtolower($product->name);

> I wanted to ask if I change image size in pto/pto.css do I need to import again images
> to changes take effect? And if having height can I set width also?
> Like:

No - css is applied on every page view but bear in mind that if you have caching enabled this would need to be cleared - CTRL-F5 will force a reload of all resources in most browsers.

You can set both width and height in CSS however this can lead to distortion. What you can do however is set max-width and max-height and that should scale the image to fit e.g.

.pto_fp img {
  max-height: 150% !important;
  max-width: 150% !important;
  width: 80%;
}

> I have one feed as json {link saved}
> But when I go to add it Setup - Automation Tool and click Save Run after setting it doesnt
> recognizes it. Some error.
> How can I get it work?

Since json is not really intended for transfer of large amounts of data (it has to be processed in its interirty in memory!) this isn't a supported format "out of the box", however I checked the reponse of your feed and this should be no problem and since it is straight forward to convert an object array to XML, one option is to "proxy" the feed via a script on your server that converts the JSON to XML. Create the following new file as scripts/proxy1.php

<?php
  header
("Content-Type: text/xml");
  print 
"<products>";
  
$json file_get_contents("{link saved}");
  
$result json_decode($json);
  foreach(
$result->products as $product)
  {
    print 
"<product>";
    foreach(
$product as $k => $v)
    {
      print 
"<".$k."><![CDATA[".$v."]]></".$k.">";
    }
    print 
"</product>";
  }
  print 
"</products>";
?>

(don't forget to REPLACE {link saved} with the URL of the json feed)

Then, in your Automation Tool job for this merchant, use as the URL:

https://www.example.com/price/scripts/proxy1.php

...where www.example.com is your site and /price/ is the Price Tapestry installation directory and you can use it just as you would any normal XML feed, so choose a suitable filename to Save As.. e.g. "MerchantName.xml".

Cheers,
David.
--
PriceTapestry.com