Battler45 / SierraMigrationToGitHub

Migration from unfuddle to GitHub
0 stars 0 forks source link

Export to Craigs List Functionality #248

Open Battler45 opened 4 years ago

Battler45 commented 4 years ago

Vihar,

Along with the manually uploaded listings and the XML syndication (that George is working on), the last piece of new functionality we need to add for the HuffRealtyRentals.com site is the ability to export Featured Listings and Manually Uploaded Listings to CraigsList.org.

CraigsList.org is the largest classified advertising network in the US, and many of our clients (not just Huff) are eager to have the ability to export their listings to it -- this is also a feature that many of our competitors already offer.

CraigsList.org does not offer an API or a way to export directly to their platform. Instead, each post on CraigsList.org must be created manually by the user by hand, and so what we will provide for them is the ability to copy HTML generated for one of their listings by our system to their clipboard so that they can then paste this into the listing creation form on CraigsList.org to help them quickly and easily post the listing.

Here are links to a few listings that the client currently has on Craig's List:

(These are temporary postings and will eventually expire, and so I've also attached screen captures of these posts.)

The client is currently using a service called vFlyer.com to manage their manual listings and produce their Craigs List postings, and we basically want to emulate the functionality they have with vFlyer.com (the client plans to drop that service eventually, once our new site goes live).

Here is the login info for the client's vFlyer account:

Username - Huffrental@gmail.com Password - RockAndRoll20122013

Please log in there and play around to review the Craigs List posting functionality there, as that is what we will want to emulate. Actually, I just logged in and noticed that the client does not currently have any flyers created. So, please login using bpeskoe@yahoo.com / b3nb3n, which is a test account that I set up. There is one flyer there -- go to "Flyers" in top menu.

Once logged in, go to Edit Listing and scroll down -- you'll see a "Choose Theme" section. The themes in the select box are the ones that vFlyer has available by default for all clients, and we will want to do something similar, but we will only need 2-3 themes to start, rather than dozens.

If you click the "Preview" link, you'll see an example of what the flyer would look like when published to craigs list (at top left, change select box from Property Website to Craigslist Template).

If you then click yellow "Republish" button, you'll see the mechanism that vFlyer provides the user for exporting to Craigslist -- they have a text area which includes all of the necessary HTML for the listing flyer, with links below for "How to post to Craigslist", "Launch Craigslist," and "Copy HTML."

Those are the essential elements of what we will need to do for the client via the CAA, though our workflow and presentation will probably be fairly different.

Here are my initial thoughts & comments:

1 - In the CAA now, we have a "Listings (Manual Uploads)" navigation item which is specific to the manually uploaded listings functionality. Because our clients need to have the Craigslist posting ability for both manually uploaded listings and also their featured listings, I think we should change this navigation button to "Listings (Your Listings)". On mouseover, a drop-down menu would appear with the sections, "Manual Listings Manager" and "Featured Listings Manager".

2 - The links in the Manual Listings Manager would be the same the ones there now in the drop-down menu. The links in the Featured Listings Manager would be "Current Listings"

3 - In the Manual Listings Manager home page, we will add a link or button to use the Craigslist functionality for each listing (more on that later) -- I'm not sure if this should be a separate page, or a tab within the edit listing page, but I'm thinking either an overlay or a separate page, because we will want to re-use the same functionality for the Featured Listings.

4 - In the Featured Listings Manager home page, it will look basically like the current page here: http://client.sierrainteractivedev2.com/featured-listings.aspx (and will, in fact, replace that page). We are going to merge the three map-centered columns currently on that page into one column (more on that later) so that we have room to add a button for the export to Craigslist functionality.

I think this approach will make more sense to clients in general, because it will consolidate all of their listings in one place (manual and featured), and will allow us to build in more functionality around this topic (reports for sellers on their listing activity, etc.) as time goes on.

So, when you are ready, please take a look at the export to craigslist topic and begin thinking about the database-specific requirements (to host the templates, to host the associations between specific listings and specific templates, to keep track of the dates on which listings are exported to craigs list by users, etc.), and let me know what questions you have.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Ben,

The approach you've suggested to club listing-specific pages under single group sounds good. My thought is that it would be good to add a button, which will redirect users to a separate page. This button could be added under the "Action" column in both the featured-listings and manage-listings pages.

A few points:

1 -- The vFlyer service provides an option for users to choose from different layouts. I'm not sure if we would offer similar options. My understanding is that we would create a few templates, which could be different in terms of color-schemes and / or layouts. That should provide users with sufficient choices.

2 -- I believe it would be good to allow users to set default listing template on per-site basis. This will eliminate the need for users to set template every time a new listing is to be processed. In addition, once a listing is associated with a template, that association would be stored in a table for future usages.

3 -- My thought is that listing template can have the following sections / groups:

When user chooses to generate html for a listing, he would be redirected to a new page (listing-export.aspx or craigslist-export). This page would be fairly similar to the community-pages-wizard.aspx page in that it would have the following sections

a -- Template Selection containing a dropdown listing all existing listing templates. If the listing as already been processed, its associated template would be selected; otherwise site's default template would be selected.

b -- Listing Header / Title - this will have two input controls. The first one will allow user to choose image to be included in the header (by default it would be populated with site's default header image). The other input control will allow users to set listing title (it would be by default populated based on the template settings)

c -- HTML Box - it will have a textarea containing the html generated based on the "detail / info box" and "image box" template code and listing details. It will also have buttons to preview listing and copy html.

4 -- The listing-template management would be an admin-only feature. Primary-manager or below will not be able to create / change templates. The "manage listing templates" and "add / edit template" pages could be similar to the existing template-pages.aspx and template-page-form.aspx pages respectively.

Pls let me know your thoughts on the same.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar,

Sorry for the delay responding on this ticket.

1 - Yes, we would need to have a few different templates / layout options available. Perhaps, for color scheme, we could pull values in the same way that the property search pages do, using the values from the Site Styles & Layout form. So, the options available to the client would be different in terms of layout, but they would not have the ability to change colors (at least not at first).

Then, for reasons described below, we also need to have a "custom template" option available on a site-by-site basis. The reason I believe we need this custom template option is that, in the example flyer provided by the client, there is a client-specific header to the page (huff realty). The only way I see for us to implement such a header would be via a custom template system, and I believe we do need to have that ability to satisfy the requirement in this case.

That said, I think we can implement this in the most simple and straightforward way possible -- by not allowing the client any ability to add, edit or delete such templates.

So, in reality, a "custom" template would differ from a standard template only insofar as it is available / visible to a single site, rather than to all sites for whom Craigs List funcitonality is enabled. We as admins will be the only ones who can set up such custom templates (manually), and we will be the only ones with the ability to edit or delete them.

This should satisfy the requirement of allowing the cient to have a custom template without the need for a lot of extra programming to enable clients to create or edit these on their own.

2 - Yes, that's a good idea. So, in the Huff example, we could set their custom template as the default, but they would also be able to select one of the "Global" templates if they wanted. It would also be good to set this association in a table for future usage. In addition to the template associated with a particular listing, we are also going to want to store the date on which the listing was last exported to a template (so that we can remind the user to re-post the listing to Craigslist after it expires in a certain amount of time -- more on that later). So, in setting this association, there will need to be a "Save / Update" button -- when clicked, this will set the association between the listing and the selected template, and it will also set the "Date Last Exported" field at the same time.

I'm going to post this now so that you can begin reviewing / working on this if you are ready, and I will post my answers to your final two points in a separate comment.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihar,

3 - Your outline for the listing template looks mostly good, but with a few issues / comments:

Per your comments on the structure of the craigs list export page, I think they are good:

a - Yes, I agree that the first section should be template selection

b - Second section would be Listing Title only. I don't believe we need to give client ability to set a first photo. In all cases, we will just use first photo for the listing as defined by OrderID property in MLSPhotos table. If they wish to use different first photo, they would need to update this either in the manual listing manager, or by editing the property listing in the MLS. Listing Title would be text input only (no HTML) and would be custom entered by user at time template is generated / saved (it would not be based on MLS listing data). However, once generated and saved, Listing Title would be populated back into the form on future edits for the same listing.

c - Yes, that sounds good (and HTML would also contain code for Listing Title as entered in previous step, correct?)

4 - I agree that listing template management system would be available to administrators only. For now, it's fine to populate templates into database manually (rather than via CAA interface). Eventually we will build CAA interface, but that will need to wait. The only additional item will be the ability to associate specific templates with a specific site (custom templates for a site) as described in previous comment.

Please let me know your thoughts on that.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihar,

Yes, your understanding is correct, thanks, and the plan to create tables looks good.

1 - Yes, it would be fine to add these associations manually for now.

2 - At least one photo would always be included, but perhaps we also need to consider a use-case where the user might only want to include one photo, rather than all photos. Perhaps, in the template selection section of the page, the user could be allowed to set this? So, there would be a set of radio buttons "Include All Photos" (selected by default) or "Include First Photo Only". That would then be stored in CAA_MLSExportTemplates along with the other values.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

Thanks for the feedback. I'll create a new page as discussed above. I believe we'll need the following two new tables to support the export-listing functionality:

CAA_ExportTemplates

ID int
Name varchar(50)
Content varchar(max)
Site_ID int - can be null (for global templates) or can have id of the site

CAA_MLSExportTemplates

MLS_ID int
ExportTemplate_ID int
Title varhcar(255)
DateLastExported smalldatetime

I understand that for now we'll add records to these tables manually. The template-contents (Content field) will have place-holders for title, and other sections. Those place-holders would be replaced with appropriate listing values. In addition, if a template contains style-specific place-holders (e.g. MainTextColor, ReversedTextColor etc...) then those would be replaced with appropriate values from the MLSSitesCSS table. And, of course, if the listing being exported has one or more photos associated with it then those would be appended at the end.

A couple of queries:

1 -- about adding interface to set template and site association - I believe this will need to be handled in the "add / edit template" page as and when it is created. For now, it would be fine to do this manually from back-end.

2 -- will photos always be included? Or do we need to support templates that may not include photos?

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Please place further comments on this ticket in Basecamp, here:

https://basecamp.com/1767592/projects/359352-123-export-to-craigs Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

A couple of questions in generating html for export:

1 -- I've some confusion in 2nd point of the above comment. Will the "Include All Photos" and "Include First Photo Only" options be applicable to the Photo-Gallery section? That is, if the "First Photo Only" option is selected then only the first photo would be shown in the photo-gallery. Pls note that majority of the vFlyer.com templates had primary photo displayed beside property-description. If we are also to create similar templates then first photo would always be included and so displaying only the first photo in photo-gallery wouldn't make sense.

Perhaps we could change the above options to a checkbox "Include Photo Gallery" (selected by default). This option will govern the display of photo-gallery.

2 -- I'm assuming that the photos displayed in photo-gallery section would point to large photos (mlslarge).

3 -- Per the current implementation, the craigslist export functionality supports the following place-holders:

LISTING_TITLE - Title as entered by the user 
MAIN_PHOTO_URL - url of the first photo (regular size)
LISTING_DESCRIPTION
AGENT_NAME - the name of the agent generating the export (AdminUser -> FirstName + LastName)
AGENT_CONTACT_NUMBER - the contact-number of the agent generating the export (AdminUser -> Phone)
PRICE
ADDRESS_LINE - Addr1 + Addr2 + AddrDir1 + AddrDir2 + AddrStreet1 + AddrStreet2
CITY
STATE
ZIP
BEDROOMS
BATHROOMS
PARKING_SPACE
YEAR_BUILT
SUBDIVISION / SUBAREA / CONDO_PROJECT / TOWNSHIP
ACREAGE
SCHOOL_DISTRICT
SQUARE_FOOTAGE
LISTING_AGENT_NAME - AgentFirstName + AgentLastName (MLS)
LISTING_OFFICE_NAME
MLS
LISTING_STYLES
CONSTRUCTION_FEATURES
ROOF_FEATURES
INTERIOR_FEATURES
EXTERIOR_FEATURES
BASEMENT_FEATURES
ENERGY_FEATURES
GARAGE_FEATURES
PARKING_FEATURES
UTILITIES_FEATURES
LOTACCESS_FEATURES
FENCING_FEATURES

Replaced with values from the MLSSitesCSS table for the active-site

MAIN_TEXT_COLOR
MAIN_TEXT_SIZE
MAIN_TEXT_FONT_FAMILY
REVERSED_TEXT_COLOR
LINK_COLOR_MAIN
LINK_COLOR_HOVER
HEADER1_COLOR
HEADER1_SIZE
HEADER2_COLOR
HEADER2_SIZE
HEADER3_COLOR
HEADER3_SIZE
HEADER_BACKGROUND_COLOR1
HEADER_BACKGROUND_COLOR2
HEADER_BACKGROUND_COLOR3

in photo-gallery repeated for all photos

PHOTO_URL

Pls let me know if any additional place-holders should be added.

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Ben,

I've incorporated changes per your feedback in #12. Pls note that there was some issue with auto-generating html post title change. I've fixed the same so the preview should now correctly included the added / changed title.

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar,

1 - Yes, you are correct. If "Include First Photo Only" option is selected, then the photo gallery would not be included in the page -- the first photo would be included to the left of the property description, but that is all. I do agree that your suggested change in wording would be better -- let's go with an "Include Photo Gallery" label with radio button options for Yes and No, with Yes being the default selection.

2 - Yes, that's correct. However, we do want to specify a max-width on these photos of 600px when displayed.

3 - Regarding the placeholders, I believe we do need a few more:

4 - The BEDROOMS value should take into account BedsStudio and BedsLoft from MLS table. When Loft is true, BEDS value should be, for example, "4 + Loft". When Studio is true, Beds value should be "Studio" (replacing any other Beds value).

5 - The BATHROOMS value should take into account both BathsFull and BathsHalf as in, for example, "3 Full / 2 Half". If only Baths value is present for a listing and both BathsFull and BathsHalf are NULL or 0, then the value would be displayed as "3" (without indication of Full or Half).

6 - The Listing Agent Name & Listing Office Name would both (most likely) not be displayed in the Craigslist post. Because client will only have the ability to generate these posts for their own featured listings, the MLS Listing Agent & Listing Office would not be required to be displayed.

Thanks.

Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihar,

Great, thank you, I will review these and let you know. Regarding next task, I actually realized we do have one item that is more pressing than the sold data -- that would be the changes to the way that market statistics are implemented / calculated.

If you could review Ticket #124, comments 14-17 you'll see that Vihang and I had a discussion regarding the way that market statistics are calculated. It would be good if, in place of the current system, we could tie this in with the SavedSearches table to allow more flexibility and multiple criteria for the calculation of statistics.

Can you review that and let me know if you have any questions? This would actually be the highest priority for us right now, as we will need to have this implemented in order to complete the HighlandsLouisvilleRealEstate.com site and get it up and running.

It may be best to copy those comments to a new ticket or to the existing market statistics ticket.

Thanks Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

A couple of queries in creating listing-export page:

1 -- I wanted to know about the permissions to apply to this page. Will it be accessible to all users having edit access to manually-uploaded / featured-listings? Per the current implementation of manually-uploaded listing permissions - a Primary Manager or above can have full permissions. In case of Managers, there are three groups

a -- can have full permissions

b -- can have permissions to create and manage their own listings

c -- cannot have create permission but can be assigned certain listings which they can edit

Agents can also be assigned listings on which they will have edit permissions.

In case of featured-listings, any user with security-level of Manager or above can have access to the featured-listings and featured-listing-map-form pages.

2 -- The listing-export page will also show the HTML generated based on the listing data / selected template. Should this HTML be displayed in a text-area? I thought it may be a good idea to show it in TinyMCE editor so that the end-users can tweak the HTML as per their needs. Of course they won't be able to save the modifications but it might be useful in certain cases.

Pls let me know your thoughts.

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar,

That's a good question about permissions. I think the best solution would be that managers with permissions to manage all manually uploaded listings could do as they wished, but those with permissions to only edit certain listings would only be able to export those listings.

As far as featured listings go, any manager would be able to export any featured listing. Ideally, we would also extend this so that agent could export his / her own featured listings based on agent MLS ID of the user form, but this may not be necessary in first release. (I realize this would potentially be open to manipulation if user changed his / her mls id, but I don't think we need to worry about that too much.)

2 - On the listing export page, it's a good suggestion to use TinyMCE editor but, for now, I think we should not include it. We should have a Preview button and a text area to copy the HTML (similar to vWorker UI). The reason is that, since most agents are not very sophisticated when it comes to editing HTML, even in a visual editor, it could lead to complications for us and for managers. We may implement this at a later date but, for now, let's leave it out.

Thanks.

Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Vihar,

Also, I'm not sure I understood your question #3 in the previous comment, "Pls let me know if we can use any of these templates as the basis..." etc. Yes, these templates are the ones we plan to use for export to craigs list functionality, and so I'm not sure I understand what you are asking?

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

RE. copying HTML to clipboard functionality - there are two possible approaches to handle this.

1 -- to use basic JavaScript feature for copying contents - due to end-user security copying to clipboard is prohibited by majority of the browsers but IE does provide a JavaScript method to copy contents to clipboard. We can use this to provide a basic copying functionality to users. If user is using a non-IE browser then HTML contents would be selected and user would be asked to copy contents manually (Ctrl + C). Pls note that vFlyer appears to have implemented this approach.

2 -- to implement advanced, cross-browser solution - there are open-sources libraries available, which internally make use of flash to implement cross-browser copy-to-clipboard support. https://github.com/jonrohan/ZeroClipboard is one such library.

Pls let me know if implementing first approach would be fine for now.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar,

Great job, thanks. In reviewing the functionality, I do see have a few questions / issues:

1 - When I enter a listing title it does not seem to be displayed in the HTML preview. Is there a way to update the Preview functionality to include a listing title that has just been entered within the preview?

2 - Please change the title of this page from, "Listing Export" to "Export Listing 1234 Main St. #1112 Covington KY 42555" so that the agent will be able to easily recognize / confirm that they have selected the correct listing to export.

3 - In the Floral Blue template, it looks like there is a broken image in the space between the top photo and the top block of listing data

4 - In the Attributes area, can you add a bit more padding between each of the different feature blocks? So, add another 7px of padding between the end of one feature block and the beginning of the next

5 - In some cases, if there are not features in a given block (such as Property Features), the title of the feature block is still being display. Can you hide the title in cases where no features of that type are available for the listing?

6 - At the bottom of the post, please change the text to "All information is deemed reliable but is subject to change" (removing the words, "in this site")

7 - Rather than the export icon on the current listings page, please try the attached, which is the favicon from the craigs list site, and I think will be more immediately visible to agents who are looking for this functionality

8 - In the photo gallery, please add 10px padding between each of the photos, and then also an additional 10px between the bottom photo and the disclaimer

Also, rather than next working on the Street View for manual listings programming, please begin the Sold data (ticket #119) as it is currently more urgent.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)

Battler45 commented 4 years ago

Ben,

Thanks for the feedback.

A couple of points:

1 -- The programming is in place to automatically update the html when title is set / changed. When the focus is moved out of the "Title" field, the html would be re-generated and previewing it should reflect the change in title. Can you pls let me know the use-case when this didn't happen?

2 -- In my question #3 I actually intended to ask if I can extend / change the current test-templates and use them to create templates for production. Per your feedback I understand that it would be fine to use them in production by making changes listed in points 3 to 8.

I'll make necessary changes and update you on the same. I'll then start working on the Sold data ticket.

Thanks. Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Ben,

I've implemented the export-to-craigslist functionality. The manage-manual-listing (manual-listings.aspx) and manage-featured-listing (featured-listings.aspx) pages have been updated to show an additional option, Export in the Action column. It will open a new page, export-listing.aspx which will enable users to generate HTML for export. Pls check the same and let me know your feedback.

A few points to note:

1 -- As discussed in the above comment (#10), the copy-to-clipboard functionality is fairly basic in that it works only in IE.

2 -- The Manage Manual Listing and Manage Featured Listing options / navigation links have been consolidated under the "Listings (Your Listings)" menu. The corresponding featured-listing sub-menu (Set Map and Virtual Tour) has been removed from the Account menu.

3 -- For the purpose of testing, I've created three templates (two generic - Floral Blue and Beige, and one site-specific Huff Rentals - Beige). Pls let me know if we can use any of these templates as the basis for creating templates for craigslist export.

4 -- In case of generating HTML for manual-listings, it will use photos4.sierrainteractivemls.com domain for generating URLs for its photos. Pls note that the photos for manual-listings created on dev CAA are stored on different server, and, hence will not be displayed in preview. You can check the photos by changing the sub-domain to photos3.

I'll now work on adding Street View functionality in the manual-listing-form.

Thanks.

Posted by Shah Vihar(unfuddle username: vshah)

Battler45 commented 4 years ago

Vihar,

Also, re #10 above, I agree that the approach you've chosen for copy to clipboard functionality sounds good.

Thanks. Posted by Peskoe Ben(unfuddle username: bpeskoe)