You are here:  » Can't add new merchant


Can't add new merchant

Submitted by Pidea on Tue, 2015-06-02 14:39 in

I've just set up a new site with PT running on it. As I'd uploaded an old version it failed to run on the new server so I updated to the latest version by uploading the new files over the old one and running setup.php.

When I come to add a new merchant, when I click 'Import' it complains that I haven't entered a merchant name for the feed although I have. I've turned on debugging in config.advanced.php but that doesn't show any errors.

Any idea what might be causing this ?

Thanks

Phil

Submitted by support on Tue, 2015-06-02 15:00

Hi Phil,

Just to confirm, do you mean that on Feed Registration Step 2, when you click "Register and Trial Import" or "Register and Import", the page reloads with the "Merchant" legend highlighted in red indicating missing value or invalid fields (mouse over the legend will display the actual error message)?

~ if not and the error occurs later ~

...if a Price Tapestry database from an earlier distribution is present then setup.php would not overwrite the tables with the new versions, which is a safety precaution to ensure that a database is not overwritten by accidental invocation of setup.php. If that looks like the case here, the existing database would need to be dropped before setup.php will be able to recreate the new version (indicated by "Checking database tables - FAIL click here to install tables").

If you're not sure how to go about removing the existing tables so that the new ones can be created (the easiest way is normally to drop and re-create the database using your MySQL admin tool as provided via your hosting control panel - often an encapsulation of phpMyAdmin) let me know - if if you would like to preserve data from those tables such as Category Mapping, Product Mappging etc. then I can talk you through an upgrade process instead...

Cheers,
David.
--
PriceTapestry.com

Submitted by Pidea on Tue, 2015-06-02 15:02

Hi David, thanks for the speedy reply.

You're correct, the Merchant name goes red in step 2 when the page reloads.

Phil

Submitted by support on Tue, 2015-06-02 15:10

Hi Phil,

That is most likely to be an invalid character then - for example an apostrophe or "&" is invalid by default as merchant name, category and brand are quite strictly "normalised" (made very safe for use in URLs) by default. This restriction can be relaxed if required, either globally through the value of $config_normaliseRegExp in config.advanced.php (line 90), or perhaps best to try in the first instance, if you would like unrestricted merchant names, edit admin/feeds_register_step2.php and look for the following code at line 28:

  widget_validate("merchant",FALSE,"normalised");

...and REPLACE with;

  widget_required("merchant");

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by Pidea on Tue, 2015-06-02 15:12

It's not that - the merchant name that I'm using is Amazon. The category and brand only have a space in them.

Phil

Submitted by Pidea on Tue, 2015-06-02 15:18

David, the merchant name is Amazon so there are no invalid characters. The category and brand only contain a single space so it's not that.

Phil

Submitted by support on Tue, 2015-06-02 15:29

Hi Phil,

That's very strange - if it would be possible to have temporary FTP access I should be able to see what's going on very quickly - if that would be convenient if you could complete the Get It Installed form I'll login right away and check it out - no problem if not, let me know and I'll talk you through some extended debug code that should lead to the problem...

(as you've been a user for several years if the email address associated with your registration code is no long active drop me an email instead with the details...)

Thanks,
David.
--
PriceTapestry.com

Submitted by Pidea on Tue, 2015-06-02 18:48

All sorted thanks to David.

Basically I'd neglected to copy of config.advanced.php because I didn't want to overwrite the changes that I'd made to my old version. Of course, if I'd looked closer I would have seen that there were some changes that were introduced in the more recent version of PT.