AutoDirector forum

The AutoDirector support and advice forum

vehicle description

Post Reply

Page: 1

Author Post
Member
Registered: Feb 2013
Posts: 7
Hi!

When using the import wizard (using example_data) the way it converts the description to bullet points etc is great but how can you edit this?

All I want to do for new is add a line of text below this with our telephone number.

I thought it would pick up info-example.txt but this doesn't seem to be working.

Thanks in advance.
Scott
Administrator
Registered: Apr 2008
Posts: 324
Take a look at the import profiles (the ini files in import/profiles). There is some help in example_profile.ini but, in essence, you just need a \n control character for a new line.

Hope that helps.
_______________
AutoDirector administrator
Member
Registered: Feb 2013
Posts: 7
Thanks Craig

I have added \n but when uploading its messing up the bullet points...

Am I missing something?:

= "'- Description\n[12]\n\n- Features\n* ' . str_replace(', ', '\n* ', '[13]')\n\n- Call us on 0843 523 5865"

Thanks
Administrator
Registered: Apr 2008
Posts: 324
That code will take the content of column 13, then replace every comma and space with a carriage return followed by an asterisk. Is that what you need? Edit the vehicle and see the "more information" box to work out how the import operated.
_______________
AutoDirector administrator
Member
Registered: Feb 2013
Posts: 7
Hi

What I want to do is add a contact us and some details.

I have done this manually on this listing:

http://www.disabledvehicles.org.uk/accessible/wheelchair-accessible-vehicles-stock.html?cid=190

I want to add this contact us section, at the moment I am having to upload via csv and then go through each and copy/paste this part in...

Thanks
Scott
Administrator
Registered: Apr 2008
Posts: 324
Hmm - you shouldn't need to do that. Are you sure you've edited the same profile as you're using in the import wizard?
_______________
AutoDirector administrator
Member
Registered: Feb 2013
Posts: 7
Hi Craig

I'm editing the correct profile yes as when I upload it is messing up the format, so I have to put it back to original.

I think its a case of me editing the profile wrong, where to I need to enter the information in the profile.ini so that it displays that contact info, as it does in the listing on this link:
http://www.disabledvehicles.org.uk/accessible/wheelchair-accessible-vehicles-stock.html?cid=190

It very time consuming going through each manually when I update stock every week - and copying in the contact us info.

Thanks
Scott
Administrator
Registered: Apr 2008
Posts: 324
Hi,

You need to add it to the info line, but I suspect you're getting quotes mixed in some way. This should do it...

info	 = "'- Description\n[12]\n\n- Features\n* ' . str_replace(', ', '\n* ', '[13]') . '\n\n- Call us on 0843 523 5865'"


I hope that helps?
_______________
AutoDirector administrator
Member
Registered: Feb 2013
Posts: 7
Hi Craig - this helps but I've spent hours and tried 10+ different ways of changing this to create another section of 'contact us' - and non seem to work.

Where exactly do I enter - after or between which quotes?

E.g. the following I have tried:

info = "'- Description\n[12]\n\n- Features\n* ' . str_replace(', ', '\n* ', '[13]')- Contact us"


info = "'- Description\n[12]\n\n- Features\n* ' . str_replace(', ', '\n* ', '[13]')"'-Contact Us"


info = "'- Description\n[12]\n\n- Features\n* ' . str_replace(', ', '\n* ', '[13]')"'-Contact Us\n[16]"

The last one I was thinking create another column in the excel sheet with the text want to include below the contact us.

Thanks
Scott
Administrator
Registered: Apr 2008
Posts: 324
Hi,

I'm not exactly sure where you're going wrong but, in essence, the string is simply PHP code. Take off the outer quotes temporarily and that may be more apparent, i.e.

'- Description\n[12]\n\n- Features\n* ' . str_replace(', ', '\n* ', '[13]') . '- Contact us'


That code should work, but remember to surround it with double-quotes in the ini file.

Craig
_______________
AutoDirector administrator
Member
Registered: Feb 2013
Posts: 7
I seem to have solved it! - thanks for your time

Post Reply

Page: 1