Full Picture Path and Product Path in CSV Export
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6.25
-- Browser(s) name and version -- : Chrome 52
Hello everybody. I want to make an export of data . That with the CSV works very well , but I would need for the product and the image of the entire path . Is it somehow possible to set it so , so instead will vase.jpg then entered www.xxx.ch/pictures/vase.jpg .
I try to work with channable.com
I hope you understand the google translate . Roger
Please Log in or Create an account to join the conversation.
You can edit the file "export" of the view "product" via the menu Display>Views and add the code:
Please Log in or Create an account to join the conversation.
This solution don`t work, but i see the problem.
I need this function in the mass action and i think this code is on another place.
Sorry for my fault and i hope you can help me.
Ups, i take the www.xxx ..... as a placeholder, now i see this is a "grmmmpfh" site......
The real path i need is www.ludibrium.ch/images/com_hikashop/upload/ .........
Thanks
Roger
Please Log in or Create an account to join the conversation.
The modification was for the "export" button of the products listing.
For the export of the mass action system, it is indeed another modification necessary.
You'll have to add the code:
Please Log in or Create an account to join the conversation.
I give the csv file from mass action to "channable" to pass the products. Until now, I could make all adjustments with additional fields, but I can not get the manufacturer to get into the csv. I have the IDs in the export, but need the name of the manufacturer. Is there a possibility. Many many thanks. Roger
Please Log in or Create an account to join the conversation.
There is no 1/2 line changes you can add to do that as you need to load the manufacturer data with a MySQL query and then replace the id by the name from the results to the products array in the _loadResults function of the administrator/components/com_hikashop/classes/massaction.php
It will require a developer to help you with that.
Please Log in or Create an account to join the conversation.
However, I still need the full URL to the product for Mass Actions. Can you tell me how to modify the mass action.php to achieve that?
PS: At the moment there is no value in that field
Thank you
Please Log in or Create an account to join the conversation.
The problem is that when HikaShop/Joomla generates a product page URL, it uses the current menu item to get its alias, etc.
In the backend, when you process a mass action, or when it is triggered automatically, that information is not available.
And it's not possible for HikaShop/Joomla to guess which menu item you want to use for each product so even if it would pick one automatically or ask you to choose one, you might end up with different URLs than what you want if you have several menu items for your shop.
That's why the best way to do that if you want to is to have a canonical URL in your products (HikaShop can generate it automatically with the "Force canonical URLs on listings" setting of the HikaShop configuration), and to use such code :
Please Log in or Create an account to join the conversation.
The data that is filled into the "product_url" field in mass action is actually the Brand URL not the Product URL.
I have added the code as you suggested and set the listings to generate the canonical url ...
???
Please Log in or Create an account to join the conversation.
Yes, I know that the product_url contains the Brand URL.
As I said the Product URL isn't stored and I didn't talk about the "product_url" column at all, so I don't see why you bring it up.
If you have a canonical URL in your product and you've done the code modification as explained, then you'll get the product page URL in the product_canonical column of your exported CSV.
Please Log in or Create an account to join the conversation.
Now I have all the entries in the field, however ...
1. the domain is missing in the front even though we add it in the call
if($data=='product' && $table == 'product_canonical')
$element = ' scarvesaustralia.com.au/'.$element ;
2. some of the entries do not start with '/' some do ....
Would you be able to help me further please? Thank you
Please Log in or Create an account to join the conversation.
Hard to say without more details.
Please provide a screenshot of the settings of your mass action and a screenshot of the modification you did in the massaction.php file.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Ok, I see now.
For the canonical URL, instead of that modification, add the code:
if($params->table=='product' && $column == 'product_canonical')
$element->$column = 'http://www.xxx.ch'.$element->$column;
before the line:
if(isset($element->$column) && ($key===$k1 || $key===$params->table) && is_string($this->displayByType($params->types,$element,$column))){
Please Log in or Create an account to join the conversation.
Happy New Year to you Nicholas!
That is it. It works now. Thank you.
However, one question. I set the trigger to HOURS but changes to the products are not reflected, meaning the data file is not written. Does this need a cron job to work?
I used AFTER CREATE PRODUCT, UPDATE PRODUCT ... it works but only exports the one product. I need all of them.
Please Log in or Create an account to join the conversation.
Yes, you need to configure the cron if you want to use period triggers:
www.hikashop.com/support/documentation/5...ashop-cron-task.html
Please Log in or Create an account to join the conversation.
Thank you
Please Log in or Create an account to join the conversation.