Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 06-17-2020 10:16:24

juanstg
Member
From: Evansville, IN
Registered: 02-26-2010
Posts: 73

Category Feature Grid Import Problem

Hello,

I am trying to import items into ecom_prod that has information in the Category Feature Grid (2 Lines to be specific).  When I export the table to make myself a template the catfeatgridid column of the CSV file shows the Feature Name of line one then a | symbol, the Feature Value.  Then as if there is a carriage break it moves to the second line followed by the Feature Name, the | symbol and the Feature Value, I'm assuming if I had more lines it would follow the same process.
When trying to get this information back into the CSV to import I have not been able to get it to recognize a solution for the Carriage Break.
I have tried all sorts of things, using double quotes " single quotes ' using \r\n or any variation of it, using Char(13) all to no winning combination.  Even with just adding spaces it will not work, once it is in the database I can log into phpmyadmin and scroll down to the catfeatgridid and hit Enter between the 2 lines, once that is done it will display correctly on the site.

I am sure this is a simple solution and I am just looking into it way to hard. 

Thanks in advance!



Offline

 

#2 06-18-2020 08:41:10

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19525
Website

Re: Category Feature Grid Import Problem

I'm not sure what you're editing the CSV with that would give you trouble.  Perhaps you're editing with a program like Excel.  If that's the case, to get a carriage return in a cell, depress shift then enter and it will enter a carriage return in a cell instead of jumping to the next cell.  You are correct in the format (name|value\r\n).


Nick Hendler

Offline

 

#3 06-18-2020 10:34:49

juanstg
Member
From: Evansville, IN
Registered: 02-26-2010
Posts: 73

Re: Category Feature Grid Import Problem

I guess I need to elaborate a little.  So the problem is, I am taking information from a PDF (100+ pages) and adding it to a csv file.  In order to get the information into the catfeatgrid column I have to combine 2 or more columns using the Concatenate feature.
Example PDF has the following table:

ITEM        PART NO.            DESCRIPTION                                                                                          QTY
1            102500101       Asm, Pedal Box Gas (includes items 2 through 17) ......................................... 1
2            102528601       GCOR, Prec ...................................................................................................... 1

Now imagine this on a larger scale of lines.  So I am trying to copy each row into a spread sheet on a mass scale.  The ITEM and QTY are the Name and Value in the Feature Grid.

You are correct in the format (name|value\r\n)

Qty Required|4 \r Diagram ID|1\rn

This is what the csv should show after I merge everything but when I import it using the Raw Database admin it shows the literal form of \r which gets displayed on the website and throws the columns off, I do not use the \r\n at the end so these are irrelevant.  How do I get the import to recognize the \r and not take it as an actual character.



Offline

 

#4 06-19-2020 08:53:41

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19525
Website

Re: Category Feature Grid Import Problem

\n is the newline character used to denote line breaks on Unix systems.

\r is the carriage return character used to denote line breaks on Macs.

\r\n is a combination of the carriage return character (\r) and newline character (\n) used to denote line breaks on Windows.

K9 normalizes all line endings as \r\n to make everything portable.  If you're on a Windows machine, using shift+Enter in an Excel spreadsheet cell will insert a line break (\r\n).


Nick Hendler

Offline

 

#5 06-19-2020 16:59:36

juanstg
Member
From: Evansville, IN
Registered: 02-26-2010
Posts: 73

Re: Category Feature Grid Import Problem

I'm not sure you are grasping the scope of what I am trying to do.  Yes I am using Windows and Excel.  But I am trying to get around going to each line in the spreadsheet and hitting Shift+Enter, because there are 100's of lines. 
If it's not possible can you point me into the direction of something that might work otherwise.



Offline

 

#6 06-22-2020 07:49:20

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19525
Website

Re: Category Feature Grid Import Problem

If the data is properly formatted, you shouldn't have to go into every cell.  The newlines should have come through when you loaded the CSV and everything should look like you expect.  I'm missing what your problem is.  I assumed you didn't know how to get a newline in a cell (shift+Enter) in order to add a new row.


Nick Hendler

Offline

 

#7 06-24-2020 05:38:27

jake25
Member
Registered: 06-24-2020
Posts: 1
Website

Re: Category Feature Grid Import Problem

Many thanks to you for giving such valuable tips and descriptions!

Offline

 

#8 06-24-2020 08:48:42

juanstg
Member
From: Evansville, IN
Registered: 02-26-2010
Posts: 73

Re: Category Feature Grid Import Problem

I finally figured this out, here is the formula needed to make it work.

=CONCATENATE("QTY|" & CG2 & CHAR(10) & "Diagram ID|" & CH2)

CG2 and CH2 are the columns that contain the data pulled from the pdf.



Offline

 

#9 06-24-2020 09:57:35

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19525
Website

Re: Category Feature Grid Import Problem

Excellent smile


Nick Hendler

Offline

 

#10 06-26-2020 15:46:41

juanstg
Member
From: Evansville, IN
Registered: 02-26-2010
Posts: 73

Re: Category Feature Grid Import Problem

Well I have run into another problem with importing.  When I import into ecom_prod it does not seem to retain the price map details.  When I open up the Product Offers page on the Admin of K9 and go to Configure All Types the Inv Item ID is blank.  However when I look at the row in PHPMyAdmin the data is there as well as in the Price Map.  Even editing the data this way does not make it appear in the K9 Admin.
I have tried to ensure all the columns are filled correctly, gathering all my templates from the Raw Database Admin but I must be missing something. I do understand that there are 3 tables involved, ecom_inventory, ecom_pricemap and ecom_prod.



Offline

 

#11 06-29-2020 08:17:25

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19525
Website

Re: Category Feature Grid Import Problem

Make sure whatever you have in ecom_prod.xpricemap matches an ecom_pricemap.id entry.  And that ecom_pricemap entry must map back to a valid inventory item via ecom_pricemap.xinvid=ecom_inventory.id.  You have non-existent references you need to build.


Nick Hendler

Offline

 

Board footer