Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding images to my site


prbhasson

Recommended Posts

Hello,

 

All my images from my supplier come in csv format but I have one problem. The images are listed like this: hxxp://www.2buypcs.com/mmPCSNEW/Images/100x100/SNN5836.gif.

 

Is there a way to use these in osc or do I have to remove all the information before SNN5836.gif to get them to show up in osc? There has to be an easier way than manually removing as I have thousands of images to load.

 

Any help is appreciated!!!!

 

Thanks

Link to comment
Share on other sites

Hello,

 

Thanks Chris. I do use easy populate. I guess you don't understand my question.

 

when I get the picture file from my supplier it has the full URL link. When I upload that the

 

pictures do not show up in my store. If I remove the url and leave just the image name they show up. This is a tedious task

when you have thousands of products. Is there another way to do this?

 

Thanks

Link to comment
Share on other sites

Hi Randy,

 

No, I did not understand exactly what you are saying. That does pose a problem and unfortunately I don't know of any contribution that would strip the URL from the image name.

 

 

 

Chris

Link to comment
Share on other sites

All my images from my supplier come in csv format but I have one problem. The images are listed like this: hxxp://www.2buypcs.com/mmPCSNEW/Images/100x100/SNN5836.gif.

 

If the format is ALWAYS like this you could try around with "explode" or something like this, to create a function to get the right image name. You can read about here

Link to comment
Share on other sites

If you're on a Windowz platform I'm fairly certain I could write a program (.EXE) that would strip the URL from the CSV file for you.

 

And it shouldn't take very long to contrive.

 

A few hours maybe.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

If you're on a Windowz platform I'm fairly certain I could write a program (.EXE) that would strip the URL from the CSV file for you.

 

And it shouldn't take very long to contrive.

 

A few hours maybe.

 

 

Thanks for the offer. I have resolved the problem though. I contacted my supplier and they were able to get me a zip file with all their images.

Link to comment
Share on other sites

Within easypoplate.php you could strip off the prefix.

 

Say the value hxxp://www.2buypcs.com/mmPCSNEW/Images/100x100/SNN5836.gif is in $image

 

$img_name = csv_explode('/', $image);
$image = $items[6]

 

The only problem is if the supplier starts messing about with the depth of the directory structure.

 

You could adapt this ( straight from php.com )

 

<?php
$path = "/home/httpd/html/index.php";
$file = basename($path);         // $file is set to "index.php"
?>

 

So much quicker than a windows exe.

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...