export product url from front end
14 years 1 month ago #62596
by Boudewijn
export product url from front end was created by Boudewijn
Hello,
Is it possible to export the product url's of the products?
Is it possible to export the product url's of the products?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
14 years 1 month ago #62604
by Mohamed Thelji
Replied by Mohamed Thelji on topic Re: export product url from front end
Hello Boudewijn,
I don't really understand your question but you can for example have the link of every product through the "Add to cart HTML link" button in your product page.
I don't really understand your question but you can for example have the link of every product through the "Add to cart HTML link" button in your product page.
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62642
by Boudewijn
Replied by Boudewijn on topic Re: export product url from front end
Hello Mohamed,
There are product sites like google products where I can upload my products.
But these site need a productlist in csv with different product information. And also the url to the product on my website.
Does this give you more information?
There are product sites like google products where I can upload my products.
But these site need a productlist in csv with different product information. And also the url to the product on my website.
Does this give you more information?
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62737
by Xavier
Replied by Xavier on topic Re: export product url from front end
Hi Boudewijn,
Actually there is no export for the url of the product.
But you can do it manually by creating a custom field, for example "url", with the type "product" and for each products add the url of the product, you can find it through the "Add to cart HTML link" button, in the url custom field of the product.
Then when you export a product, the url is in the .csv file.
Actually there is no export for the url of the product.
But you can do it manually by creating a custom field, for example "url", with the type "product" and for each products add the url of the product, you can find it through the "Add to cart HTML link" button, in the url custom field of the product.
Then when you export a product, the url is in the .csv file.
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62944
by Boudewijn
Replied by Boudewijn on topic Re: export product url from front end
Hello Mohamed,
The first step I understand.
I created in custom field a field called product_url
But then? could you describe a bit more specific?
The first step I understand.
I created in custom field a field called product_url
But then? could you describe a bit more specific?
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62965
by Xavier
Replied by Xavier on topic Re: export product url from front end
Hi Boudewijn,
You can set a default value in your custom field "product_url", like: " yousite.com/index.php?option=com_hikasho...oduct&task=show&cid= "
And in the product edition page, just add the cid at the end of the url. You can find this url in your browser address bar.
It's possible that the default value doesn't appear on your product configuration page.
If it doesn't appear you will have to edit the view "product / form" in HikaShop > Display > Views (backend template)
And add the lines:
Before:
You can set a default value in your custom field "product_url", like: " yousite.com/index.php?option=com_hikasho...oduct&task=show&cid= "
And in the product edition page, just add the cid at the end of the url. You can find this url in your browser address bar.
It's possible that the default value doesn't appear on your product configuration page.
If it doesn't appear you will have to edit the view "product / form" in HikaShop > Display > Views (backend template)
And add the lines:
Code:
<?php
if(!isset($this->element->$fieldName))
$this->element->$fieldName = $oneExtraField->field_default;
?>
Code:
<?php $onWhat='onchange'; if($oneExtraField->field_type=='radio') $onWhat='onclick'; ?>
<?php echo $this->fieldsClass->display($oneExtraField,$this->element->$fieldName,'data[product]['.$fieldName.']',false,' '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\'product\',0);"'); ?>
The following user(s) said Thank You: Mohamed Thelji
Please Log in or Create an account to join the conversation.
13 years 11 months ago #69385
by Boudewijn
Replied by Boudewijn on topic Re: export product url from front end
Hello Xavier,
Thanks for your information. But my knowlegde is to low and I have to many products to maintain this.
I have taken a look at the google products file. And as I see it has all the information in it.
But I need it as a straight table.
There is another topic on this as well
www.hikashop.com/en/forum/4-how-to/65563...t-my-export-csv.html
Is there some way to get the google products file set as a table?
Then I think a lot is solved.
Thanks for your information. But my knowlegde is to low and I have to many products to maintain this.
I have taken a look at the google products file. And as I see it has all the information in it.
But I need it as a straight table.
There is another topic on this as well
www.hikashop.com/en/forum/4-how-to/65563...t-my-export-csv.html
Is there some way to get the google products file set as a table?
Then I think a lot is solved.
Please Log in or Create an account to join the conversation.
13 years 11 months ago #69549
by nicolas
Replied by nicolas on topic Re: export product url from front end
Maybe a copy/paste of Xmap could help you ?
www.hikashop.com/en/support/documentatio...ation-with-xmap.html
Xmap will be able to produce a list of all the products in your shop and that link is clickable to go to the product page. So with a copy of HTML copy/paste and search&replace you should be able to get a listing of the product URLs with it.
www.hikashop.com/en/support/documentatio...ation-with-xmap.html
Xmap will be able to produce a list of all the products in your shop and that link is clickable to go to the product page. So with a copy of HTML copy/paste and search&replace you should be able to get a listing of the product URLs with it.
Please Log in or Create an account to join the conversation.
11 years 1 month ago #211073
by hactic
Replied by hactic on topic export product url from front end
For a backlink from a price comparison page, you can directly link to a product id via the Joomla / HikaShop controller, e. g. for product ID 1717:
shop.smartgart.com/en/?option=com_hikash...roduct&task=show&cid []=1717
PHP wise, this is:
$table1 = "joomla_hikashop_price";
$table2 = "joomla_hikashop_product";
$table3 = "joomla_hikashop_category";
$join1 = "price_product_id = product_id";
$join2 = "product_manufacturer_id = category_id";
$order1 = "category_name";
$order2 = "product_name";
$exportfile = '/xxx/export-prices-geizhals.csv';
$rows = $mysqli->query("SELECT * FROM $table1, $table2, $table3 where $join1 and $join2 ORDER BY $order1, $order2");
// table does not exist
if($mysqli->errno == 1146) {
printf("%d: %s<br>/n", $mysqli->errno, $mysqli->error);
} else {
$myfile = fopen($exportfile, "w");
fwrite($myfile, "Produktbezeichnung;Herstellername;Preis;Deeplink;Herstellernummer;Verfügbarkeit;Versand Vorkasse;Versand Nachnahme\n");
while($obj = $rows->fetch_object()) {
$deeplink = ' shop.smartgart.com/en/?option=com_hikash...roduct&task=show&cid []=' . $obj->product_id;
fwrite($myfile, "$obj->product_name;$obj->category_name;" . round($obj->price_value * 1.19, 2) . ";$deeplink;$obj->product_manufacturer_id;auf Bestellung;6;12\n");
} // while
fclose($myfile);
$rows->close();
best regards
Klaus
shop.smartgart.com/en/?option=com_hikash...roduct&task=show&cid []=1717
PHP wise, this is:
$table1 = "joomla_hikashop_price";
$table2 = "joomla_hikashop_product";
$table3 = "joomla_hikashop_category";
$join1 = "price_product_id = product_id";
$join2 = "product_manufacturer_id = category_id";
$order1 = "category_name";
$order2 = "product_name";
$exportfile = '/xxx/export-prices-geizhals.csv';
$rows = $mysqli->query("SELECT * FROM $table1, $table2, $table3 where $join1 and $join2 ORDER BY $order1, $order2");
// table does not exist
if($mysqli->errno == 1146) {
printf("%d: %s<br>/n", $mysqli->errno, $mysqli->error);
} else {
$myfile = fopen($exportfile, "w");
fwrite($myfile, "Produktbezeichnung;Herstellername;Preis;Deeplink;Herstellernummer;Verfügbarkeit;Versand Vorkasse;Versand Nachnahme\n");
while($obj = $rows->fetch_object()) {
$deeplink = ' shop.smartgart.com/en/?option=com_hikash...roduct&task=show&cid []=' . $obj->product_id;
fwrite($myfile, "$obj->product_name;$obj->category_name;" . round($obj->price_value * 1.19, 2) . ";$deeplink;$obj->product_manufacturer_id;auf Bestellung;6;12\n");
} // while
fclose($myfile);
$rows->close();
best regards
Klaus
Please Log in or Create an account to join the conversation.
11 years 1 month ago #211075
by nicolas
Replied by nicolas on topic export product url from front end
Hi,
Thank you for your feedback.
Note that this thread is almost 3 years old.
Since then, there is an easy solution to do that in HikaShop.
Simply configure the "Force canonical URLs on listings" setting of the HikaShop configuration to generate them if missing and the system will automatically fill in the canonical URLs of the products when the listings are displayed on the frontend.
Then, when you run a normal export of the products in HikaShop, you'll be able to get the links in the product_canonical column of the CSV.
One thing though will be that the generated links will be relative and thus won't contain your domain name.
It it would be really easy to either have it done automatically with a batch replacement of the CSV, or even a small modification of the export view file generating the CSV in HikaShop.
Thank you for your feedback.
Note that this thread is almost 3 years old.
Since then, there is an easy solution to do that in HikaShop.
Simply configure the "Force canonical URLs on listings" setting of the HikaShop configuration to generate them if missing and the system will automatically fill in the canonical URLs of the products when the listings are displayed on the frontend.
Then, when you run a normal export of the products in HikaShop, you'll be able to get the links in the product_canonical column of the CSV.
One thing though will be that the generated links will be relative and thus won't contain your domain name.
It it would be really easy to either have it done automatically with a batch replacement of the CSV, or even a small modification of the export view file generating the CSV in HikaShop.
Please Log in or Create an account to join the conversation.
Time to create page: 0.239 seconds