{"id":21681,"date":"2016-04-14T11:02:15","date_gmt":"2016-04-14T11:02:15","guid":{"rendered":"https:\/\/docs.wpgeodirectory.com\/?p=21681"},"modified":"2016-04-14T11:54:08","modified_gmt":"2016-04-14T11:54:08","slug":"changing-franchises","status":"publish","type":"post","link":"https:\/\/wpgeodirectory.com\/docs\/changing-franchises\/","title":{"rendered":"Updating or changing franchises using CSV import"},"content":{"rendered":"<h3>Introduction<\/h3>\n<p>Maybe you already have a number of listings and you just installed the <a href=\"\/docs\/franchise-manager-add-on\/\">Franchise Manager Add-on<\/a>, and you want to re-organize your listings, assigning some as main listings and some as franchises.<\/p>\n<p>Or you want to add new listings to your directory using the CSV upload.<\/p>\n<p>Or you just want to make some changes to some of your franchise listings.<\/p>\n<h3>Updating or changing franchises using CSV import<\/h3>\n<ol>\n<li>Make sure you are familiar with the <a href=\"\/docs\/core-export\/\">CSV import and export functionalities of GD<\/a>.<\/li>\n<li>Activate the\u00a0<a href=\"\/docs\/franchise-manager-add-on\/\">Franchise Manager Add-on<\/a>\u00a0if not done already.<\/li>\n<li>Make sure your main listings are added to your database already. If not, add them using your admin area or a CSV \u00a0import.<\/li>\n<li>Export your listings using the CSV export at GD &gt; Import &amp; Export.<\/li>\n<li>The table below shows an example of an exported CSV:<br \/>\n<table>\n<tbody>\n<tr>\n<td>post_id<\/td>\n<td>post_title<\/td>\n<td>ignored columns<\/td>\n<td>gd_is_franchise<\/td>\n<td>gd_franchise_lock<\/td>\n<td>franchise<\/td>\n<td>ignored columns<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\">\u00a010<\/td>\n<td>Main<\/td>\n<td>&#8230;<\/td>\n<td style=\"text-align: right;\">1<\/td>\n<td>geodir_email, post_title<\/td>\n<td style=\"text-align: right;\">\u00a00<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\">\u00a011<\/td>\n<td>Chain<\/td>\n<td>&#8230;<\/td>\n<td style=\"text-align: right;\">0<\/td>\n<td><\/td>\n<td style=\"text-align: right;\">\u00a00<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\">\u00a012<\/td>\n<td>Franchise1<\/td>\n<td>&#8230;<\/td>\n<td style=\"text-align: right;\">0<\/td>\n<td><\/td>\n<td style=\"text-align: right;\">\u00a010<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ol>\n<li><strong>post_id:<\/strong> An exported file always has a post_id for each post.<\/li>\n<li><strong>gd_is_franchise:<\/strong> 1 means this is a main listing.<\/li>\n<li><strong>gd_franchise_lock:<\/strong> This are the<a href=\"\/docs\/franchise-manager-add-on\/#usage\"> locked custom fields<\/a>.<\/li>\n<li><strong>franchise:<\/strong> A number other than zero here means this is a franchise of a main listing, in this example <em><strong>Franchise1<\/strong><\/em> is a franchise of the <em><strong>Main\u00a0<\/strong><\/em>listing.<\/li>\n<\/ol>\n<\/li>\n<li>Now let&#8217;s make a few changes:\n<ol>\n<li>Add a new franchise to <em><strong>Main<\/strong><\/em>.<\/li>\n<li>Change <em><strong>Chain<\/strong><\/em> into a main listing, and do lock the video custom field.<\/li>\n<li>Make <em><strong>Franchise1<\/strong><\/em> a franchise of <em><strong>Chain<\/strong><\/em>.<\/li>\n<\/ol>\n<\/li>\n<li>This is the new CSV file to upload:<br \/>\n<table>\n<tbody>\n<tr>\n<td>post_id<\/td>\n<td>post_title<\/td>\n<td>ignored columns<\/td>\n<td>gd_is_franchise<\/td>\n<td>gd_franchise_lock<\/td>\n<td>franchise<\/td>\n<td>ignored columns<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\">\u00a010<\/td>\n<td>Main<\/td>\n<td>&#8230;<\/td>\n<td style=\"text-align: right;\">1<\/td>\n<td>geodir_email, post_title<\/td>\n<td style=\"text-align: right;\">\u00a00<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\">\u00a011<\/td>\n<td>Chain<\/td>\n<td>&#8230;<\/td>\n<td style=\"text-align: right;\">1<\/td>\n<td>geodir_video<\/td>\n<td style=\"text-align: right;\">\u00a00<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\">\u00a012<\/td>\n<td>Franchise1<\/td>\n<td>&#8230;<\/td>\n<td style=\"text-align: right;\">0<\/td>\n<td><\/td>\n<td style=\"text-align: right;\">\u00a011<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right;\"><\/td>\n<td>Franchise2<\/td>\n<td>&#8230;<\/td>\n<td style=\"text-align: right;\">0<\/td>\n<td><\/td>\n<td style=\"text-align: right;\">\u00a010<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ol>\n<li>Leave the <strong>post_id<\/strong> of existing listings, so they will be overwritten when re-uploading.<\/li>\n<li>New listings should not have a <strong>post_id<\/strong>.<\/li>\n<li>Changing <strong>gd_is_franchise<\/strong> to <strong>1<\/strong> changes <em><strong>Chain<\/strong><\/em> into a main listing.<\/li>\n<li>Adding\u00a0<strong>geodir_video<\/strong> to\u00a0<strong>gd_franchise_lock<\/strong> for <em><strong>Chain<\/strong><\/em> means that all future franchises of <em><strong>Chain<\/strong><\/em> will show the same video custom field as the main listing.<\/li>\n<li>Changing <strong>franchise<\/strong> from <strong>10<\/strong> to <strong>11<\/strong> for <em><strong>Franchise1<\/strong><\/em> now assigns <em><strong>Franchise1<\/strong><\/em> as a franchise of <em><strong>Chain<\/strong><\/em> instead of<em><strong> Main<\/strong><\/em>.<\/li>\n<li><em><strong>Franchise 2<\/strong><\/em> is a new listing, so does not have <strong>post_id<\/strong> and is assigned as a franchise of the listing with <strong>post_id<\/strong> <em><strong>10 (Main).<\/strong><\/em><\/li>\n<\/ol>\n<\/li>\n<li>Finally, re-upload the CSV file, and make sure to select\u00a0<em><strong>Update listing if post with post_id already exists <\/strong><\/em>on the Import &amp; Export page.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Maybe you already have a number of listings and you just installed the Franchise Manager Add-on, and you want to re-organize your listings, assigning some as main listings and some as franchises. Or you want to add new listings to your directory using the CSV upload. Or you just want to make some changes to some of your franchise listings.<\/p>\n","protected":false},"author":1676,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[159],"tags":[],"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/21681"}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/users\/1676"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/comments?post=21681"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/21681\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/media?parent=21681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/categories?post=21681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/tags?post=21681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}