csv import url's for image

  • Posts: 14
  • Thank you received: 0
12 years 7 months ago #42136

i cannot seem to get it grab images from url, my distributor has 282k worth of products, all of which that i distribute. its over 2tb worth of images, i can manually complete this process by pasting the link under the add images, but it only loads the name when i use the csv, honestly, 99% of all software offer the option to use a url, even though the process can be achieved manually, i would love someone to show me a way to automate this. please and thank you. also kudos to the devs on a great cart, by far the most fluid and easy to use ive seen.

Josh

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
12 years 7 months ago #42146

nvm,

using my elite excel skills <---(lol) i was able to create a spreadsheet that automagically creates each filename and concatenates wget and .jpg to the url and dumps to .sh file which can be placed at the /uploads root and ran. if anyone else has a massive inventory and needs a csv solution like this email me at This email address is being protected from spambots. You need JavaScript enabled to view it.

thanks

Please Log in or Create an account to join the conversation.

  • Posts: 82726
  • Thank you received: 13342
  • MODERATOR
12 years 7 months ago #42188

Hi,

You can directly put the URL of your images in the "images" column of your CSVs and HikaShop will download them automatically to your website in order to attach them to your products.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
12 years 7 months ago #42932

not so much
it omits the .jpg suffix, no matter what i do
also i need to know how to do multiple images per product
they way i described earlier works just fine, but adding url doesnt work
also i need a way to add an option, id like to be able to see the original price logged in as superuser, i have a formula that calculates my price_value column based on percentage and cost amount id like to be able to add a characteristic that allows me to do this.
thanks in advance

Last edit: 12 years 7 months ago by snmp.

Please Log in or Create an account to join the conversation.

  • Posts: 82726
  • Thank you received: 13342
  • MODERATOR
12 years 7 months ago #43035

What do you mean by "it omits the suffix" ?
This works fine on our end. The image is properly added to the product.
But yes, in the "file name" information, the extension is removed and only the name of the file is kept. That's normal since that's a different field than the "file path" where you have the filename of the file.

If you want to change that behavior, you'll have to change the code in the _insertFiles function of the administrator/components/com_hikashop/helper/import.php

Please give more information on what you want to do regarding prices and characteristics. I didn't understand what is the "orginal" price you're talking about and how it's related to characteristics selection and super admin accounts.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
12 years 7 months ago #43057

nicolas,

thanks for your response.
ive tried adding via text area, and csv
product_code,images
100003, xxxxxxx.com

and it never works
as far as pricing goes, i have over 300k worth of products so i cannot manipulate every item with a individualized price markup. what i have to do is edit my csv using a formula and another column basically if(e2=<500,e2*1.2,if(e2=>750,e2*1.15, and so on and so forth. this calculate my price markup for me based off of the items cost. what i want is to be able to have an original_price column for the original price of the item and have it only viewable by a superuser, basically it doesnt show up unless admin is viewing it. we are using the shop for our physical location as well and this lets my employees and myself see the markup and profit margin on each item, in the case we need to provide a discount to price match or other discount. thanks again

Please Log in or Create an account to join the conversation.

  • Posts: 82726
  • Thank you received: 13342
  • MODERATOR
12 years 7 months ago #43200

Hi,

I tested the import with an image URL just to make sure that it's working. I didn't had any problem.

I used that CSV:

product_code,images
my_prod1,http://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png

Why not just create a custom field of the table "product" (commercial editions) via the menu Display->Custom fields ? That will allow you to enter your product original price in the back end. You can choose whether you want to display it or not on the front end and with the ACL support of the Business edition, you can even limit the display based on user groups.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
12 years 7 months ago #43375

nicholas,

i need to be able to update the original price just as i would the adjusted price. i need it to update automatically via csv. 100s of 1000s of products i do not have time to enter the original price for all of them. is there a way to get hika to grab via csv?

Please Log in or Create an account to join the conversation.

  • Posts: 82726
  • Thank you received: 13342
  • MODERATOR
12 years 7 months ago #43501

Sure. Once you created the custom product field in HikaShop, the field will be available in the export CSV and you will also be able to import it via CSV. You will need to use the "column name" value of your custom field as column name in your CSV.

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
12 years 7 months ago #43512

i dont see the option available in existing products, however it is available when i add a product, i tried importing a csv and that was a no go. i need it to be available with exisitng products

Please Log in or Create an account to join the conversation.

  • Posts: 82726
  • Thank you received: 13342
  • MODERATOR
12 years 7 months ago #43513

Custom fields will of course display for existing products too.
They are also handled by the import.
If, that's not working, it must come from the configuration of the custom field (or the CSV not valid).

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 3
10 years 1 week ago #176870

Hi there,

slightly off-topic, but I also would like to factor in the profit margin. I. e. I obtain a CSV file from a wholesale supplier, which in one column contains the B2B price I have to pay for the product (low), and in another column contains the suggested retail price with a certain profit margin (high).

Now, I would like to explicitly specify that profit margin myself, based on the low price I have to pay.

I would like to see such functionality in Hikashop (similar to the formula that is suggested above), or maybe some can suggest a sample pre-processing script (sed, awk?) that factors in that logic.

Also, I am looking for a simple (pre-processor) mechanism for existing products to map product codes from various wholesale suppliers or from the manufacturer to my product codes. That way I would be more flexible in swapping a supplier.

Please Log in or Create an account to join the conversation.

  • Posts: 82726
  • Thank you received: 13342
  • MODERATOR
10 years 1 week ago #176912

Hi,

There is no such pre processing script that I know of for that (you would have to create it).
For the prices, there is a solution.
You can use a mass action (that you can create via the menu System>Mass actions). You can have it update the price_value of all the products with a percentage of the initial price:
www.hikashop.com/support/support/documen...massaction-form.html
www.hikashop.com/forum/mass-actions/8611...s-by-percentage.html

Please Log in or Create an account to join the conversation.

  • Posts: 35
  • Thank you received: 3
10 years 1 week ago #176973

Thanks Nicolas. -- I had a look into awk and coded a simple preprocessor that rearranges the CSV.
Two sample routines quoted below.

best regards

Klaus @hactic


the price logic:

BEGIN {
FS = ";";
UST = 1.19;
datestamp = 0; # TODO $(date '+%d/%b/%Y'); # "'"$(date)"'"}'; # +'%Y-%m-%d %r';
}
{
if("Axis" == $4) {
if($10 < 0) ; # error
else if($10 < 500) price = $10 * UST * 1.15;
else if($10 < 1000) price = $10 * UST * 1.10;
else price = $10 * UST * 1.05;

print "product_code;" $3 ";" $5 ";" $10 ";" price ";" $14 ";" $15 ";" datestamp;
}
}
END {

mapping manufacturer product codes to product_codes in HikaShop:

BEGIN {
FS = ";";

while ( (getline line < "map-axis-smartgart.txt") > 0 ) {
split(line, f);
map[f[1]] = f[2];
}
}
{
product_code = "product_code";
if(map[$2] != "")
product_code = map[$2];
print product_code ";" $2 ";" $3 ";" $4 ";" $5 ";" $6 ";" $7 ";" $8
}
END {

}

map file map-axis-smartgart.txt:

mfr_code,product_code
0543-001;M3007-P
0515-001;M3007-PV
0556-001;M3027-PVE
...

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.112 seconds
Powered by Kunena Forum