My Sellerdeck Account | Free Trial

Sellerdeck Community & Knowledge Base

Go Back   Sellerdeck Community > Discussion Areas > Bug Reports

Search powered by Google
Register FAQ Members List Search Today's Posts Mark Forums Read

Thread Tools Search this Thread Useful Thread? Display Modes
Old 04-May-2017, 01:02 PM
NormanRouxel's Avatar
NormanRouxel NormanRouxel is online now
Registered User
Join Date: Dec 2002
Full Name: Norman Rouxel
Posts: 10,814
Thanks: 9
Thanked 768 Times in 640 Posts
SellerDeck cannot import its own Exported Data

The hierarchical file Act_DesignExport.txt that SellerDeck creates during a Partial Site Design export sometimes cannot be imported back into SellerDeck. The fault seems to be with the import routine so this may affect all hierarchical imports.

DEMONSTRATION: Using SD 16.0.3 demo site (but fails on earlier versions too).

Duplicate a product layout and call it Buggy Dummy Layout.
Open Buggy Dummy Layout and paste in the following sample code;
<div style="padding: 10px 0; width: 1008px; margin: 0 auto;">
<!-- Google Code for Purchased Conversion Page -->

<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="dummy"/>

<actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e" >
	<script type="text/javascript">
		<actinic:block if="%3cactinic%3avariable%20name%3d%22BazaarVoiceTestMode%22%20%2f%3e" >
			// test code
			function trackTransactionPageView(obj){
				var txt = "ID:" + obj.orderId 
					+ "\x0d\x0aTAX:" + 
					+ "\x0d\x0aSHIP:" + obj.shipping 
					+ "\x0d\x0aTOT:" + 
					+ "\x0d\x0aCOUNTRY:" + 
					+ "\x0d\x0aEMAIL:" + 
					+ "\x0d\x0aNICK:" + obj.nickname; 
				for (var i=0; i<prodlines.length; i++)
					txt += "\x0d\x0a\x0d\x0aLINE " + (i+1) 
						+ "\x0d\x0aSKU:" + obj.items[i].sku
						+ "\x0d\x0aNAME:" + obj.items[i].name 
						+ "\x0d\x0aCAT:" + obj.items[i].category 
						+ "\x0d\x0aQTY:" + obj.items[i].quantity 
						+ "\x0d\x0aUNIT:" + obj.items[i].price;
		var prodlines = new Array();
		function bv_numberonly(num){	// return numeric bit of 1,234.56 type string
			return num.replace(/[^0-9.]/g, '');
		function bv_fixspaces(txt){	// replace &nbsp; with normal space
			return txt.replace(/&nbsp;/g, ' ');
		function bv_striptags(txt){	// strip HTML tags
			return txt.replace(/<.*?>/g,'');
		function bv_unescape(txt){	// remove SD escaping
			return txt.replace(/&#(\d+);/g, function(m,s){return String.fromCharCode(s - 0)});
		function bv_cleanemail(email){ // clean email address
			return bv_unescape(bv_striptags(email.replace(/Email:&nbsp;/ig, '')));	// remove extraneous text
		function bv_reportOrder(){
			// collect product lines
				var ref = $('.cartprodref:first', this).text().replace(/\//g, '-');
				var name = $('.cartprodname:first', this).text();
				var qty = $('.cartprodqty:first', this).text();
				var unitprice = bv_numberonly($('.prodlineunitprice:first', this).text());
					// NB tabs before commas needed to fix SD Act_DesignExport bug
					"sku" : ref,
					"name" : name,
					"category" : "aw",
					"price" : unitprice,
					"quantity" : qty});
			// send details
Do Design / Export Specific Design Elements and create a Partial Site Design called buggydummylayout.acd containing just the single layout Buggy Dummy Layout from above.

Now do File / Import / Hierarchical Import / Update and choose "Act_DesignExport.txt" from your Site folder (this was created when doing the PSD above) / say next to everything else and choose a file for reporting errors.

You should see an error:
Line 231: Data type error. The field Markup Type was given \r\n					""price"" : unitprice when it expected an integer.
Now Act_DesignExport.txt was just created by SellerDeck when doing the Partial Site Design so should be problem free but isn't.

The bug seems to be on the import as the exported file looks OK.


Edit layout Buggy Dummy Layout and look near the bottom for the following code:
					"category" : "aw",
Edit the above to put a tab before the comma (code is syntactically the same after doing this):
					"category" : "aw" ,
Repeat creating the Partial Site Design as above and then re-import the fresh Act_DesignExport.txt and voila - no errors!

It looks like the Hierarchical import sometimes cannot deal with a line ending in ", when importing. This seems to be dependent on the size of the code as removing lines near the top of the above layout sometimes clears the problem.
Norman -
Edinburgh, U K / Bitez, Turkey
Reply With Quote
The Following User Says Thank You to NormanRouxel For This Useful Post:
Duncan Rounding (05-May-2017)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT. The time now is 06:33 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.