latrommi 0 Napisano 3 Marca 2014 Udostępnij Napisano 3 Marca 2014 w Adres, przecinek i problem przy eksporcie Dzień dobry, mamy problem w Sello z adresem i potem jego eksportem do firm kurierskich. Problem występuje tylko wtedy, gdy uzupełnione zostaną obydwa pola adresu w Sello ("Adres" np. jako ulica oraz "Adres c.d." jako numer na tej ulicy), jak na obrazku poniżej (zwykle z allegro takie dane nie przychodzą - tj. adres przychodzi w jednej linijce, więc problem może być niszowy, ale dla nas jest ważny): W takim przypadku Sello umieszcza drugą część (w tym przypadku numer) po przecinku, co przy eksporcie w pliku np. csv (np. dla DPD) jest dużym problemem - pole zostaje rozdzielone na dwa i w efekcie cały adres zostaje pozbawiony numeru ulicy. Czy można zmienić Sello tak, by nie wstawiało tego przecinkami między jedno a drugie pole adresu? Pozdrawiam! Cytuj Link to postu
Ks. Robak 314 Napisano 3 Marca 2014 Udostępnij Napisano 3 Marca 2014 w Adres, przecinek i problem przy eksporcie Czy korzystacie z transformat pobranych z tego forum ? Bo jeśli tak, to pewnie nie będzie problemu z poprawą tego błędu, ale to już eksperci od transformat musieliby się wypowiedzieć. Cytuj Link to postu
latrommi 0 Napisano 3 Marca 2014 Autor Udostępnij Napisano 3 Marca 2014 w Adres, przecinek i problem przy eksporcie Tak, mamy z tego forum, ale możliwe, że z modyfikacjami. Przesyłam poniżej na przesyłki kurierskie: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="http://www.sello.pl/export"> <xsl:output method="text" encoding="Windows-1250"/> <xsl:strip-space elements="*" /> <xsl:variable name="comma">;</xsl:variable> <xsl:variable name="kurier">DPD</xsl:variable> <!-- PoniĹĽsze dane proszÄ™ wyedytować --> <xsl:variable name="S_Name">Czwarty Listek</xsl:variable> <xsl:variable name="S_Address">Bociania 19 lokal 42</xsl:variable> <xsl:variable name="S_Zip">02-807</xsl:variable> <xsl:variable name="S_City">Warszawa</xsl:variable> <xsl:variable name="S_Phone">(22) 115-17-15</xsl:variable> <xsl:variable name="S_Email">sklep@czwartylistek.pl</xsl:variable> <xsl:variable name="S_Contact_Person">Michal Szymczak</xsl:variable> <!-- PoniĹĽej naleĹĽy wpisać nazwy sposobĂłw dostawy odpowiednich dla kategorii paczek --> <xsl:variable name="Kategoria_Paczki_Kopertowka">Przesyłka kurierska</xsl:variable> <xsl:variable name="Kategoria_Paczki_Kopertowka_Pobraniowa">Przesyłka kurierska pobraniowa</xsl:variable> <xsl:variable name="Kategoria_Paczki_do5kg"></xsl:variable> <xsl:variable name="Kategoria_Paczki_do10kg"></xsl:variable> <xsl:variable name="Kategoria_Paczki_do20kg"></xsl:variable> <xsl:variable name="Kategoria_Paczki_do30kg"></xsl:variable> <xsl:variable name="Kategoria_Paczki_do50kg"></xsl:variable> <xsl:variable name="Kategoria_Paczki_do70kg"></xsl:variable> <!-- PowyĹĽsze dane proszÄ™ wyedytować --> <xsl:template match="/"> <xsl:text>S_Name;S_Address;S_Zip;S_City;S_Phone;S_Email;S_Contact_Person;P_Cat_KP;P_Cat_5;P_Cat_10;P_Cat_20;P_Cat_30;P_Cat_50;P_Cat_70;R_Name;R_Address;R_Zip;R_City;R_Phone;R_Email;R_Contact_Person;P_Courier_Name;P_Comment;P_Cod</xsl:text> <xsl:text></xsl:text> <xsl:apply-templates select="s:ExportData/s:Package" /> </xsl:template> <xsl:template match="s:Package"> <xsl:value-of select="$S_Name"/><xsl:value-of select="$comma"/> <xsl:value-of select="$S_Address"/><xsl:value-of select="$comma"/> <xsl:value-of select="$S_Zip"/><xsl:value-of select="$comma"/> <xsl:value-of select="$S_City"/><xsl:value-of select="$comma"/> <xsl:value-of select="$S_Phone"/><xsl:value-of select="$comma"/> <xsl:value-of select="$S_Email"/><xsl:value-of select="$comma"/> <xsl:value-of select="$S_Contact_Person"/><xsl:value-of select="$comma"/> <xsl:choose> <xsl:when test="s:DeliveryMethod/s:DeliveryName = $Kategoria_Paczki_Kopertowka or s:DeliveryMethod/s:DeliveryName = $Kategoria_Paczki_Kopertowka_Pobraniowa">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> <xsl:value-of select="$comma"/> <xsl:choose> <xsl:when test="s:DeliveryMethod/s:DeliveryName = $Kategoria_Paczki_do5kg">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> <xsl:value-of select="$comma"/> <xsl:choose> <xsl:when test="s:DeliveryMethod/s:DeliveryName = $Kategoria_Paczki_do10kg">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> <xsl:value-of select="$comma"/> <xsl:choose> <xsl:when test="s:DeliveryMethod/s:DeliveryName = $Kategoria_Paczki_do20kg">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> <xsl:value-of select="$comma"/> <xsl:choose> <xsl:when test="s:DeliveryMethod/s:DeliveryName = $Kategoria_Paczki_do30kg">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> <xsl:value-of select="$comma"/> <xsl:choose> <xsl:when test="s:DeliveryMethod/s:DeliveryName = $Kategoria_Paczki_do50kg">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> <xsl:value-of select="$comma"/> <xsl:choose> <xsl:when test="s:DeliveryMethod/s:DeliveryName = $Kategoria_Paczki_do70kg">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> <xsl:value-of select="$comma"/> <xsl:value-of select="s:DeliveryAddress/s:Name"/><xsl:value-of select="$comma"/> <xsl:value-of select="s:DeliveryAddress/s:Line1"/><xsl:value-of select="$comma"/> <xsl:value-of select="s:DeliveryAddress/s:ZipCode"/><xsl:value-of select="$comma"/> <xsl:value-of select="s:DeliveryAddress/s:City"/><xsl:value-of select="$comma"/> <xsl:value-of select="s:DeliveryAddress/s:PhoneNumber"/><xsl:value-of select="$comma"/> <xsl:value-of select="../s:Customer[@CustomerID = current()/s:Customer/@CustomerID]/s:EmailAddress[@IsDefault = 1]"/><xsl:value-of select="$comma"/> <xsl:value-of select="s:DeliveryAddress/s:Name"/><xsl:value-of select="$comma"/> <xsl:value-of select="$kurier"/><xsl:value-of select="$comma"/> <xsl:value-of select="$comma"/> <xsl:value-of select="s:Charge"/><xsl:value-of select="$comma"/> <xsl:text></xsl:text> </xsl:template> </xsl:stylesheet> Tutaj listy: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="http://www.sello.pl/export"> <!--PrzesyĹ‚ka polecona--> <!--Informuje o tym, czy jest przesyĹ‚kÄ… „firmową”: T – tak N – nie--> <xsl:variable name="Firmowa">N</xsl:variable> <!--Informuje o tym, czy jest przesyĹ‚kÄ… „miejscową”: T – tak N – nie--> <xsl:variable name="Miejscowa">N</xsl:variable> <!--Informuje o tym, czy jest przesyĹ‚kÄ… „ubezpieczoną”: T – tak N – nie--> <xsl:variable name="Ubezpieczona">N</xsl:variable> <!--Oznaczenie umowy na podstawie, ktĂłrej nadawane sÄ… przesyĹ‚ki pocztowe (idUmowyMRUMC).--> <xsl:variable name="NrUmowy">245557</xsl:variable> <!--Oznaczenie Karty na podstawie, ktĂłrej nadawane sÄ… przesyĹ‚ki pocztowe (idKartyMRUMR).--> <xsl:variable name="KartaUmowy"></xsl:variable> <!--Dotyczy gabarytu przesyĹ‚ki: A – gabaryt A B – gabaryt B--> <xsl:variable name="Gabaryt">B</xsl:variable> <!--Opis dla danej paczki. Pole z dowolnÄ… zawartoĹ›ciÄ… nie przekraczajÄ…cÄ… dĹ‚ugoĹ›ci 40 znakĂłw--> <xsl:template name="Opis">Paczka nr <xsl:value-of select="s:Symbol"/></xsl:template> <xsl:param name="Year"/> <xsl:param name="Month"/> <xsl:param name="Day"/> <xsl:param name="Hour"/> <xsl:param name="Minute"/> <xsl:param name="Second"/> <xsl:template match="s:ExportData"> <xsl:element name="Nadawca"> <xsl:attribute name="Struktura">1.6</xsl:attribute> <xsl:attribute name="Nazwa"> <xsl:value-of select="s:Company/s:Address/s:Company"/> </xsl:attribute> <xsl:attribute name="NazwaSkrocona"> <xsl:variable name="companyName" select="s:Company/s:Address/s:Company"/> <xsl:value-of select="substring($companyName,0,10)"/> </xsl:attribute> <xsl:attribute name="Ulica"> <xsl:value-of select="s:Company/s:Address/s:Street"/> </xsl:attribute> <xsl:attribute name="Dom"> <xsl:value-of select="s:Company/s:Address/s:HouseNumber"/> </xsl:attribute> <xsl:attribute name="Lokal"> <xsl:value-of select="s:Company/s:Address/s:FlatNumber"/> </xsl:attribute> <xsl:attribute name="Miejscowosc"> <xsl:value-of select="s:Company/s:Address/s:City"/> </xsl:attribute> <xsl:attribute name="Kod"> <xsl:value-of select="translate(s:Company/s:Address/s:ZipCode,'- ','')"/> </xsl:attribute> <xsl:attribute name="NIP"> <xsl:value-of select="translate(s:Company/s:Address/s:NIP,'- ','')"/> </xsl:attribute> <xsl:attribute name="Zrodlo">NADAWCA</xsl:attribute> <xsl:attribute name="Guid"> <xsl:value-of select="s:Company/s:GUID"/> </xsl:attribute> <xsl:element name="Zbior"> <xsl:attribute name="Nazwa"> <xsl:value-of select="concat(format-number($Day,'00'),'-',format-number($Month,'00'),'-',$Year,'\1')"/> </xsl:attribute> <xsl:attribute name="DataUtworzenia"> <xsl:value-of select="concat($Year,'-',format-number($Month,'00'),'-',format-number($Day,'00'),'T',format-number($Hour,'00'),':',format-number($Minute,'00'),':',format-number($Second,'00'))"/> </xsl:attribute> <xsl:attribute name="Opis">Jakis dowolny opis</xsl:attribute> <xsl:attribute name="IloscPrzesylek"> <xsl:value-of select="count(s:Package)"/> </xsl:attribute> <xsl:attribute name="Guid"> <xsl:value-of select="s:GUID"/> </xsl:attribute> <xsl:apply-templates select="s:Package"/> </xsl:element> </xsl:element> </xsl:template> <xsl:template match="s:Package"> <xsl:element name="Przesylka"> <xsl:attribute name="Guid"> <xsl:value-of select="s:GUID"/> </xsl:attribute> <xsl:element name="Atrybut"> <xsl:attribute name="Typ">Adresat</xsl:attribute> <xsl:attribute name="Nazwa">Nazwa</xsl:attribute> <xsl:choose> <xsl:when test="s:DeliveryAddress/s:Company!=''"> <xsl:value-of select="s:DeliveryAddress/s:Company"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="s:DeliveryAddress/s:Name"/> </xsl:otherwise> </xsl:choose> </xsl:element> <xsl:if test="s:DeliveryAddress/s:Company!='' and s:DeliveryAddress/s:Name!=''"> <xsl:element name="Atrybut"> <xsl:attribute name="Typ">Adresat</xsl:attribute> <xsl:attribute name="Nazwa">NazwaII</xsl:attribute> <xsl:value-of select="s:DeliveryAddress/s:Name"/> </xsl:element> </xsl:if> <xsl:element name="Atrybut"> <xsl:attribute name="Typ">Adresat</xsl:attribute> <xsl:attribute name="Nazwa">Ulica</xsl:attribute> <xsl:value-of select="s:DeliveryAddress/s:Street"/> </xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ">Adresat</xsl:attribute> <xsl:attribute name="Nazwa">Dom</xsl:attribute> <xsl:value-of select="s:DeliveryAddress/s:HouseNumber"/> </xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ">Adresat</xsl:attribute> <xsl:attribute name="Nazwa">Lokal</xsl:attribute> <xsl:value-of select="s:DeliveryAddress/s:FlatNumber"/> </xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ">Adresat</xsl:attribute> <xsl:attribute name="Nazwa">Miejscowosc</xsl:attribute> <xsl:value-of select="s:DeliveryAddress/s:City"/> </xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ">Adresat</xsl:attribute> <xsl:attribute name="Nazwa">Kod</xsl:attribute> <xsl:value-of select="translate(s:DeliveryAddress/s:ZipCode,'- ','')"/> </xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ">Adresat</xsl:attribute> <xsl:attribute name="Nazwa">Kraj</xsl:attribute> <xsl:choose> <xsl:when test="s:DeliveryAddress/s:Country=''">Polska</xsl:when> <xsl:otherwise> <xsl:value-of select="s:DeliveryAddress/s:Country"/> </xsl:otherwise> </xsl:choose> </xsl:element> <!--Atrybuty specyficzne dla przesyĹ‚ki 845--> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Symbol</xsl:attribute>845</xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Firmowa</xsl:attribute> <xsl:value-of select="$Firmowa"/> </xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Miejscowa</xsl:attribute> <xsl:value-of select="$Miejscowa"/> </xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Ubezpieczona</xsl:attribute> <xsl:value-of select="$Ubezpieczona"/> </xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Kategoria</xsl:attribute> <xsl:choose> <xsl:when test="s:DeliveryMethod/s:Priority=1">P</xsl:when> <xsl:otherwise>E</xsl:otherwise> </xsl:choose> </xsl:element> <xsl:if test="$NrUmowy!=''"> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Umowa</xsl:attribute> <xsl:value-of select="$NrUmowy"/> </xsl:element> </xsl:if> <xsl:if test="$KartaUmowy!=''"> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">KartaUmowy</xsl:attribute> <xsl:value-of select="$KartaUmowy"/> </xsl:element> </xsl:if> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">PosteRestante</xsl:attribute> <xsl:choose> <xsl:when test="s:DeliveryMethod/s:PosteRestante=1">T</xsl:when> <xsl:otherwise>N</xsl:otherwise> </xsl:choose> </xsl:element> <xsl:if test="s:Weight"> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Masa</xsl:attribute> <xsl:value-of select="round(number(s:Weight)*1000)"/> </xsl:element> </xsl:if> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Ilosc</xsl:attribute>1</xsl:element> <xsl:if test="s:SendingNumber!=''"> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">NrNadania</xsl:attribute> <xsl:value-of select="translate(s:SendingNumber,'- ','')"/> </xsl:element> </xsl:if> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">DlaOciemn</xsl:attribute>N</xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">EgzBibl</xsl:attribute>N</xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Uslugi</xsl:attribute>R</xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Strefa</xsl:attribute> <xsl:value-of select="$Gabaryt"/> </xsl:element> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Wersja</xsl:attribute>1</xsl:element> <xsl:variable name="description"> <xsl:call-template name="Opis"/> </xsl:variable> <xsl:if test="$description!=''"> <xsl:element name="Atrybut"> <xsl:attribute name="Typ"/> <xsl:attribute name="Nazwa">Opis</xsl:attribute> <xsl:value-of select="$description"/> </xsl:element> </xsl:if> </xsl:element> </xsl:template> </xsl:stylesheet> Z góry dzięki za odpowiedź, może ktoś się dopatrzy błędu. Pozdrawiam! Cytuj Link to postu
Ks. Robak 314 Napisano 3 Marca 2014 Udostępnij Napisano 3 Marca 2014 w Adres, przecinek i problem przy eksporcie Nie pomogę, ale może ktoś inny uzupełni: W Sello są dostępne w exporcie 2 zmienne Line1 i Line2 W transformatach użyta jest tylko Line1 <xsl:value-of select="s:DeliveryAddress/s:Line1"/><xsl:value-of select="$comma"/> stąd wszystko co jest w Line2 po prostu jest pominięte. Trzeba dodać też tą drugą zmienną do transformaty....ale ja nie wiem jak, żeby działało.... Może <xsl:value-of select="s:DeliveryAddress/s:Line1"/> <xsl:value-of select="' '" /> <xsl:value-of select="s:DeliveryAddress/s:Line2"/><xsl:value-of select="$comma"/> zamiast tej linii <xsl:value-of select="s:DeliveryAddress/s:Line1"/><xsl:value-of select="$comma"/> Ale nie jestem pewien. Cytuj Link to postu
Bartosz Rosa 1 785 Napisano 4 Marca 2014 Udostępnij Napisano 4 Marca 2014 w Adres, przecinek i problem przy eksporcie W ten sposób powinno zadziałać. Cytuj Link to postu
latrommi 0 Napisano 4 Marca 2014 Autor Udostępnij Napisano 4 Marca 2014 w Adres, przecinek i problem przy eksporcie Dzięki! W przypadku przesyłek kurierskich sposób ten działa, ale z lekką modyfikacją (zamiast zrobiliśmy po prostu spację): <xsl:value-of select="s:DeliveryAddress/s:Line1"/> <xsl:value-of select="' '" /> <xsl:value-of select="s:DeliveryAddress/s:Line2"/><xsl:value-of select="$comma"/> Natomiast jak sobie poradzić w przypadku listów, gdzie w sello w paczkach nie ma podziału numeru domu, tylko jest Adres: oraz niżej Adres c.d.: ? Cytuj Link to postu
Ks. Robak 314 Napisano 4 Marca 2014 Udostępnij Napisano 4 Marca 2014 w Adres, przecinek i problem przy eksporcie W przypadku listów będzie gorzej, bo chociaż dostępne są te same dane do tranformat, czyli druga linia jest w zmiennej Line2 to w transformacie używane są inne pola HouseNumber, Street, FlatNumber. A line1 i Line2 nie są używane. Trzebaby przerobić tą transformatę, aby używała Line1 i Line2 jak w paczkach, ale nie wiem, czy wtedy z ENem będzie grało, bo nie będzie rozbicia na numer domu i ulicę, tylko wszystko będzie w jednej pozycji. Tutaj nie pomogę niestety. Może ktoś inny, kto zna ENa i transformaty lepiej. Cytuj Link to postu
Bartosz Rosa 1 785 Napisano 6 Marca 2014 Udostępnij Napisano 6 Marca 2014 w Adres, przecinek i problem przy eksporcie W eksporcie właśnie na potrzeby osobnych pól adresowych, adresy Sello są cięte na odpowiednie fragmenty składowe adresu, czyli właśnie Street, HouseNumber, FlatNumber. Cytuj Link to postu
Radek A 6 Napisano 23 Kwietnia 2014 Udostępnij Napisano 23 Kwietnia 2014 w Adres, przecinek i problem przy eksporcie Jak taki plik CSV importujecie do Webklienta DPD? Próbowałem wejść w Ustawienia -> Konfigurowanie importu krajowego, podaję ścieżkę do pliku wcześniej wyeksportowanego z Sello w CSV według schematu podanego powyżej zwierający już przesyłki. Wybieram sterownik CSV driver i teraz w parametrach sterownika powinienem wybrać: Tabulator, Średnik czy Inny? Po wybraniu jednego z nich w kolejnym oknie pojawiają się jakieś kolumny ze źródła i transformacja, co dalej? Cytuj Link to postu
Ks. Robak 314 Napisano 23 Kwietnia 2014 Udostępnij Napisano 23 Kwietnia 2014 w Adres, przecinek i problem przy eksporcie Nie korzystam z eksportu dla DPD, jedynie dla EN i Sendit, więc nie pomogę co należy w DPD wybrać. Jednak transformata z tego wątku tworzy plik CSV, więc separatorem jest przecinek. Cytuj Link to postu
PanBanBan Marcin 185 Napisano 23 Kwietnia 2014 Udostępnij Napisano 23 Kwietnia 2014 w Adres, przecinek i problem przy eksporcie Wybieram sterownik CSV driver i teraz w parametrach sterownika powinienem wybrać: Tabulator, Średnik czy Inny? Po wybraniu jednego z nich w kolejnym oknie pojawiają się jakieś kolumny ze źródła i transformacja, co dalej? Wybierz średnik. Nie korzystam z importu do DPD ale powinni mieć jakąś instrukcję co i jak robić. Może jest tam jakaś opcja dopasowania danych źródłowych, przycisk wczytaj, import? Nie bój się też napisać do pomocy DPD. Cytuj Link to postu
Polecane posty
Dołącz do dyskusji
Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.
Uwaga: Twój wpis zanim będzie widoczny, będzie wymagał zatwierdzenia moderatora.