Developer forum

Forum » Development » Problem with spaces in products id for ProductsAndGroupsSelector

Problem with spaces in products id for ProductsAndGroupsSelector

Anders Ebdrup
Reply

Hi Dynamicweb,

 

We have problem with e.g. removing products from the discount selector (ProductsAndGroupsSelector) when we have product id's containing spaces.

I think the problem will be solved by changing these three lines in ProductsAndGroupsSelector.js:

        var productRegex = /imgp_([\S]+)/;
        var groupRegex = /imgg_([\S]+)/;
        var searchRegex = /imgss_([\S]+)/;

To:

        var productRegex = /"imgp_(.+)"/;
        var groupRegex = /"imgg_(.+)"/;
        var searchRegex = /"imgss_(.+)"/;

as you will always need all the content in the string and not just a word.

 

Best regards, Anders


Replies

 
Nicolai Høeg Pedersen
Reply

In general it is not recommended to have IDs that is not a simple string.

Will have this changed though.

BR Nicolai

 
Anders Ebdrup
Reply

I know, but then having integrated solutions it can be hard to convince the client not to have this...

 

Thanks, when will it be fixed?

 
Nicolai Høeg Pedersen
Reply

Maybe for 8.8

 
Kim Søjborg Pedersen
Reply

We had a similar issue and our solution was to remove the blank space in the integration xslt and then update the db with this

UPDATE EcomProducts SET ProductID = REPLACE(ProductID, ' ', '')
UPDATE EcomProductsRelated SET ProductRelatedProductId = REPLACE(ProductRelatedProductId, ' ', '')
UPDATE EcomOrderLines SET OrderLineProductId = REPLACE(OrderLineProductId, ' ', '')
UPDATE EcomGroupProductRelation SET GroupProductRelationProductId = REPLACE(GroupProductRelationProductId, ' ', '')

 
Oleg Rodionov
Reply

Hi all,

New TFS 20731 has been submitted against the issue, will be fixed on DW 8.8.

BR, Oleg QA

 

 
Kristian Kirkholt
Reply

Hi Anders

The TFS#20731 "Problem with spaces in products id for ProductsAndGroupsSelector"

Has now been resolved in Dynamicweb version 8.8.0.0

You are able to find this build in the download section:

http://developer.dynamicweb-cms.com/downloads/dynamicweb-8.aspx

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum