Jump to content
Sign in to follow this  
DawnG

Easy CSV Import

Recommended Posts

I'm using the Easy CSV Import to carry out some bulk uploads, but the prices are going in incorrectly.

http://www.oscommerce.com/community/contributions,4920

 

For example if I set a price at £11.95 the price that is uploaded to the database is 1195.000

 

I have two questions relating to this contrib:

 

1 - How do I fix the pricing issue?

 

2 - How would I customise to include the header tags fields i.e. Products Page Title, Page Header Description, Product Keywords

 

Any help would be greatly appreciated.

Edited by DawnG

Share this post


Link to post
Share on other sites

Haven't tried it but what happens if you remove the currency symbol

 

e.g.

 

11.59

 

not

 

£11.59


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 ======>>>>>.

Share this post


Link to post
Share on other sites
I'm using the Easy CSV Import to carry out some bulk uploads, but the prices are going in incorrectly.

http://www.oscommerce.com/community/contributions,4920

 

For example if I set a price at £11.95 the price that is uploaded to the database is 1195.000

 

I have two questions relating to this contrib:

 

1 - How do I fix the pricing issue?

 

2 - How would I customise to include the header tags fields i.e. Products Page Title, Page Header Description, Product Keywords

 

Any help would be greatly appreciated.

 

 

Here is now to fix:

 

Open the file /admin/csv_import.php

 

Edit line 298:

 

Original:

$data[$products_fields['products_price']] = str_replace('.', '', $data[$products_fields['products_price']]);

 

Comment that line out.

 

New:

//$data[$products_fields['products_price']] = str_replace('.', '', $data[$products_fields['products_price']]);

 

 

Then reupload that file and you should be good. Not sure WTF he was doing when he said "Excel uses ',' as decimal separator, mysql decimal uses '.'" in his comments, but it's wrong.

 

 

Clear the categories then try the import again.

 

Email nickmattern@gmail.com if you need help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×