Add new sales channel id and changed to ignore query params handling.
This commit is contained in:
+17
-3
@@ -58,14 +58,28 @@ fn main() -> Result<(), csv::Error> {
|
||||
// Combine source url
|
||||
let source_url = source_url_vec.join("/");
|
||||
|
||||
|
||||
let sales_channel;
|
||||
let id = record.subshop_id.unwrap();
|
||||
|
||||
if id.clone().eq("3") { // Lodner Geschmackswelten
|
||||
sales_channel = "01963bc08ea57102bf347e203eaa9e63";
|
||||
} else if id.clone().eq("1") { // Lodner Gewürze
|
||||
sales_channel = "01963bc08e987236ac5285e480769684";
|
||||
} else if id.clone().eq("2") { // Pfefferkontor
|
||||
sales_channel = "01963bc08ea0717892a3c86b4eefbd06";
|
||||
} else if id.eq("4") { // Crazy Snack
|
||||
sales_channel = "01963bc08eab702d852109975a1b0527";
|
||||
} else { // Set for all when no subshop id
|
||||
sales_channel = "";
|
||||
}
|
||||
|
||||
records.push(Record{
|
||||
source_url,
|
||||
target_url: Some(target_url),
|
||||
http_code: Some("301".to_string()),
|
||||
enabled: Some("1".to_string()),
|
||||
query_params_handling: Some("".to_string()),
|
||||
sales_channel_id: Some("".to_string()),
|
||||
query_params_handling: Some("1".to_string()), // 1 to ignore query parameters
|
||||
sales_channel_id: Some(sales_channel.to_string()),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user