June 15, 20179 yr I use openoffice calc and save new spreadsheets with the .ods file extension until I'm ready to convert it to a .csv file. Every time I go to import in admin I have to keep changing the field separator and multivalue separator depending on whether I'm importing categories, products or combinations. Screenshot shows field delimiter and text delimiter when exporting from .ods to .csv @spidawebs can you help me out please?
June 16, 20179 yr The defaults are semicolon for the fields, and comma for multiple values. They should actually stay the same across entities admin: themes\default\template\controllers\import\helpers\form\form.tpl Holds the defaults when there is none set yet in the cookie
June 16, 20179 yr Author The defaults are m for the fields, m? Can you please edit your post so it all stays together unless you meant "m"? Thank you very much. I can do this!
December 3, 20179 yr Author @Nemo I have been using new field separators for a long while now with great success. Can you please tell me how to edit the code so that these are the default separators? Field separator: ^ (caret above #6 on keyboard) Multiple value separator: comma Thank you, Stephanie
December 6, 20178 yr Stephanie, Could you clarify? You mean setting them as default in the configuration? admin folder \themes\default\template\controllers\import\helpers\form\form.tpl They are hardcoded in there, just search the labels, they are if statements
December 6, 20178 yr Author @Nemo Yes, I want to set the defaults but I don’t understand how to edit / update what the below is from the last time we did this: The image in the first post is where I want to change the settings again. I can see the quote mark but somehow can’t see where to put the other setting. I’ll try again tomorrow with a fresh view. Thanks, Stephanie
December 6, 20178 yr This part: value="{if isset($separatorselected)}{$separatorselected|escape:‘html’:‘UTF-8’}{else};{/if}" Reads like this: "If the user selected a separator, use that selected separator, otherwise use semicolon (;)." So, you only have to change this part that sets the semicolon as the default separator: {else};{/if}
December 6, 20178 yr Author @Nemo I saw the code much easier in Sublime than in my text editor, so that was great. @moy2010 Thank you for translating it so I would understand it. :) Between the two of you, I believe I now know what I am doing. Unfortunately, it is still not working. In the form.tpl file, I changed the field separator as follows: {else}^{/if} (caret) The multiple value separator was how I wanted it: {else},{/if} (comma) I updated the Field and Multiple Value Separators in the form.tpl but the admin csv separators will not update. They stay at: field separator is a comma and the multiple value separator is a semicolon. My updated field separator code and updated multiple value separator code is as follows: {l s='**Field separator**'} {l s='e.g. '} 1, Blouse, 129.90, 5 {l s='Multiple value separator'} {l s='e.g. '} red.jpg; blue.jpg; green.jpg </div> This screenshot is from my file manager on my host because I wanted to confirm the file was actually updated. (I used Filezilla to download the file, edited it with Sublime and uploaded it with Filezilla.) This screenshot shows the settings have not changed in the admin - CSV import section: This screenshot is the updated form.tpl file: I use CSV uploads very regularly. Anyone with suggestions as to why the form.tpl does not change the csv upload default parameters? Thanks, Stephanie
December 15, 20178 yr Author Can someone please see what may be wrong with the code? Even the multiple value separator doesn’t work and I didn’t have to change it. Is there anywhere else the defaults can be changed for these csv import separators in admin?
December 15, 20178 yr @alwayspaws Why do you want to change the code in the script? My best experiences with the CSV files are field separators as a semicolon and the separator for multi-valued fields as a comma. Before the import, I only have to turn each time in the two input fields so that it works. But it works great with me.
December 16, 20178 yr Author @zimmer-media Remember this? https://forum.thirtybees.com/topic/931/solved-how-to-use-csv-import-for-many-colors-sizes-for-a-single-product/115 - I’m not going through that again. My csv’s work perfectly. I just want to change the separators in the admin csv import section. Someone here has to know why the updated form.tpl doesn’t work. @Traumflug Any ideas, please? Thanks.
December 16, 20178 yr Everything seems to be alright in the code; have you cleared both smarty and your browser' cache?
December 30, 20178 yr Author I'm still trying to change the default field separator and multiple value separator in the back office for CSV imports. I want the field separator to be a caret which is this symbol: ^ and the multiple value separator to be a comma. It's been two weeks since I updated ONE CHARACTER in the code and uploaded the edited form.tpl so, supposedly, any cache that was stuck should be cleared by now if it is cache I cannot clear myself in admin or my three browsers. The only change to the existing code was to change the comma to a caret for the field separator. The multiple value separator was already a comma, so it did not need changing, however, it still has the multiple value separator as a semicolon in the CSV import section in the back office. That, in itself, means something else needs to be updated. What can it be, please? Here is the field separator code: ** and here is the multiple value separator code: ** and here is the screenshot of the updated form.tpl: Here it shows the latest updated file exists on my host: @SLiCK_303 Maybe you can help me figure this out. You're great at finding solutions.
December 30, 20178 yr @alwayspaws , I'm afraid I know nothing about csv imports or exports, or any code that controls it. Sorry...
Create an account or sign in to comment