Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding SKU and UPC's


Guest

Recommended Posts

I'm unable to figure out how to add SKU's and UPC's to the catagories.php and such. I think right now I'll just stick with the SKU option but I can't figure out how to or were to insert all the information. I'm running on Snapshot 2002/06/24 or around that, I would update but I have already done that a few time, I would rather have my store up and running :)

Link to comment
Share on other sites

There is a mod available that will show you how to add SKU's or PLU etc.

 

Have you looked for this?

 

If not go to the contributions section and find it.

I have it running and it does a very nice job.

 

CC.

Link to comment
Share on other sites

yep that's where I got the idea it says "admin/categories.php - search for products_model and right after it put products_ISBN or UPC or SKU" well if you do a search for products_model you get more than just one you get several, just like most of the stuff in the install.txt its pretty general if it had a little more detail I wouldn't be asking for help :)

Link to comment
Share on other sites

It aint hard.

 

If it says find that bit of code and after it put the needed bit of code just do it.

 

so do it after all of them! Not just one.

Otherwise it would say which one to do it on wouldn't it???

 

Back to the drawing board.

 

CC.

Link to comment
Share on other sites

  • 3 weeks later...

Firstly I must say thank you to all who have contributed to this project. "Even the guy who's instructions are whoopin' me at the moment!!!"

 

I can only hope to repay by one adding some of my own code in the near future.

 

I have put together a fully modded version of osCommerce for my site using contribs and I have become quite familiar with adding bits of code where necessary. "BUT"

 

I must say the SKU, UPC mod instructions are killing me!!!

 

They are unclear and I am quite certain they've left quite a few would-be osCommerce users looking down the barrel of a shotgun for relief. :shock:

 

It would be greatly appreciated by all who try to add this mod in the future to have an install sheet that is concise and straight forward. If anyone could interpret the instructions into an easily understandable doc, please do. :D

 

A large store cannot function efficiently without product identifiers.

 

Thanks a bunch!

Link to comment
Share on other sites

LOL it took me almost an hour to two hours to figure it out and pretty much all I did was where the products_model was I added next to it products_SKU and so on through out what the install text file said. It was a pain in the butt and I still have a bug when in the catagories.php under the product model it says TEXT_PRODUCT_SKU. Also the SKU isn't showing up in the shopping cart :( any ideas?

Link to comment
Share on other sites

As far as the TEXT_PRODUCT_SKU goes, you need to add a define statement in admin/includes/languages/english/categories.php.

 define('TEXT_PRODUCT_SKU', 'This is the SKU');

Change 'This is the SKU' to whatever you want it to say in the admin section. As far as adding it to the database, if you want to send me the file I'll look at it. I think I've installed this one before. Maybe I can give a little back now. :)

If every member of this board donated $1 to the dev team, that would be over $11,000.00. Don't you think this cart is worth at least a $1????

Link to comment
Share on other sites

I'm about ready to give up and just find someone I can pay every 2 weeks as long as its not too much, I need the store designed ASAP and I don't have the knowledge, and the person I had doing is isn't doing a very good job :( he is chargeing 150 per day, kinda spendy if you ask me. I want to change the over all look and feel of my store. If you are interested in the project contact me via E-mail [email protected] and I will give you the full details. Hope someone can help me out.

Link to comment
Share on other sites

  • 2 weeks later...

Did anyone get this to work? I'm still having trouble getting the code into categories.php file.

the install file says

Changes

admin/categories.php - search for products_model and right after it put products_ISBN or UPC or SKU

and when you do a search it has 10 results.

ok.. asuming you have to put after each one of the... BUT insert what??

Please Help.

Link to comment
Share on other sites

Ok...

 

I got it working after many hours of playing and fiannly just printing out the 2 files code and sitting there and marking where i needed to add the code.

 

It may sound hard and endurious, but someone did code this for free for you to use, so a little work and effort shouldn;t be too hard to muster up.

 

I did this by reading ALL the readme carefully and following exactly what it said.

If you do this it will work, ONLY if it is compatible with your version, so check this also. Version number at top of your file should help youalong the way.

I cant say anything else, all the info you need is already there, just read it carefully and do AS IT SAYS TO THE VERY LETTER!

 

CC.

Link to comment
Share on other sites

Why can't you simply use the products_model field to hold the SKU. If you are using SKU"s properly, you won't use the same one twice and it is a ready made field. I found the idea that a contribution was needed is ludicrous.

 

I store the SKU for over 6,000 items in the Model Field using a pseudo-ISBN format. The SKU represents the Category of item, Item Number as well as color and size.

 

The number looks like:

 

99W-00000-000-00

 

The first section just designates it as a non-book. The next five numbers are the item number, the third section is three digits for the category and the last section is two digits for necessary attributes like color and size. For Attributes, I use Numbers and Letters giving me 1296 possible combinations so I don't think I will run into any limits for the foreseeable future.

 

The only drawback is that the supplied field is only 12 characters long. However I just edited it to 20 characters long with phpMyAdmin.

Link to comment
Share on other sites

I agree that the model field would work and that was my initial solution, but I need it to show up as equally important to the product name. All my customers know the sku more than the name of the product. At the same time I can't just reverse them because the sku's listed instead of the name is too confusing. I would lump them together but there is no way of merging them together out of my accounting package.

 

Can you tell me how to get the model to show up in all occurences of the product? If i can do that I would be fine.

 

I have just been following this thread and see potential in the sku addon but the documentation for it is retarded and the so-called suggestions of the peers in the forum are sometimes more belittling than helpful. Don't get me wrong I am not expecting overwhelming support for non technical minded persons on an open source offering, but I have hit a wall on this addon and don't see any CONSTRUCTIVE help for it. Just "RTFM" rhetoric.

 

How bout instead of flaming me (for which I am quite deserving :lookround: ) give me a suggestion on how to solve my problem.

Link to comment
Share on other sites

Well... here is a small info that will help you.

remember that the documentation says:

Changes

admin/categories.php - search for products_model and right after it put products_ISBN or UPC or SKU

 

SO.... here is what to do.

1. when you add the entry in the DB make sure you add it in the middle of the table right after the "products_model"

2. now lets take a look at the categories.php.

do a search for the key word "products_model". (I found 10) ok?

now lets look at the first result you should see:

'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']),

 

(actually that code displys to results from our search)

SO WHAT TO DO YOU ASK? Well it is simple. just create the following line after it.

'products_upc' => tep_db_prepare_input($HTTP_POST_VARS['products_upc']),

 

3. lets move on to another example.

 $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'");

can you see where the products_model is? good just add after it "products_upc,"

 

Hope that will help someone.

Have fun

Link to comment
Share on other sites

  • 2 months later...

I have tried to add this contrib numerous times and here is where I am most confused - the instuctions state this:

 

catalog/includes/languages/english/default.php

 

- Find this section and make the additions for the UPC

<?php

} elseif ($category_depth == 'products' || $HTTP_GET_VARS['manufacturers_id']) {

// create column list

$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,

'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,

//for description to show in catalog

'PRODUCT_LIST_DESCRIPTION' => PRODUCT_LIST_DESCRIPTION,

'PRODUCT_LIST_UPC' => PRODUCT_LIST_UPC, /*added 3/17/02 for upc*/

'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,

'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,

'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,

'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,

'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,

'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

 

 

 

Then find this section

 

 

 

case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model';

break;

case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name';

break;

case 'PRODUCT_LIST_DESCRIPTION': $select_column_list .= 'pd.products_description';

break;

case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name';

break;

case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity';

break;

case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image';

break;

case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight';

 

 

 

and replace it with

 

case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model';

break;

case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name';

break;

case 'PRODUCT_LIST_UPC': $select_column_list .= 'p.products_upc';

break;

case 'PRODUCT_LIST_DESCRIPTION': $select_column_list .= 'pd.products_description';

break;

case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name';

break;

case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity';

break;

case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image';

break;

case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight';

 

break;

 

 

 

or look for this line

 

case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model';

break;

 

and add the fllowing after it

 

case 'PRODUCT_LIST_UPC': $select_column_list .= 'p.products_upc';

break;

 

 

HOWEVER MY catalog/includes/languages/english/default.php shows this:

 

define('TEXT_MAIN', 'intro text goes here.');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Items For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Items');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

if ($category_depth == 'products' || $HTTP_GET_VARS['manufacturers_id']) {

define('HEADING_TITLE', 'Here are a few of our items');

define('TABLE_HEADING_IMAGE', 'Photo');

define('TABLE_HEADING_MODEL', 'Size');

define('TABLE_HEADING_PRODUCTS', 'Product');

define('TABLE_HEADING_MANUFACTURER', 'Material');

define('TABLE_HEADING_QUANTITY', 'Quantity');

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_WEIGHT', 'Weight');

define('TABLE_HEADING_BUY_NOW', 'Buy Now');

define('TEXT_NO_PRODUCTS', 'There are no items to list in this category.');

define('TEXT_NO_PRODUCTS2', 'There is no item available for this material.');

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Items: ');

define('TEXT_SHOW', '<b>Show:</b>');

define('TEXT_BUY', 'Buy '');

define('TEXT_NOW', '' now');

define('TEXT_ALL', 'All');

} elseif ($category_depth == 'top') {

define('HEADING_TITLE', '');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Please make a selection');

}

?>

 

 

 

So am I looking in the wrong file???? :oops:

 

please help!!!

Link to comment
Share on other sites

sorry dude,

I gave up on this contrib for poor docs and cuz I didn't want to goof with core files that much (upgrades could be tough).

 

I got what I needed done with the model field as is recommended. If you need a longer model field you can extend it with mysqladmin from 12 to whatever.

Link to comment
Share on other sites

If you can export your products to an excel spreadsheet you can combine the model number field with the product name or description so that it is easily visible to the customer and easily searchable. Then you can use Easy Populate to upload the file to your catalog and it will update the changed fields.

 

Debbie

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

first off, as for the cross posting - I was simply doing searches in the forum to find issues related - sorry for the cross posting

 

anyway, I did check in product_listing and that did help a couple problems - am in the process of writing new readme txt and adding a few tid bits to make it a little more understandable - anyway, here is my current error:

 

1054 - Unknown column 'p.products_upc' in 'field list'

 

 

this is presenting itself in both the customer and admin views - in customer view it presents itself once item is chosen and product display is showing and in admin the error presents when item is clicked on to edit

 

also, I unfortunately have missed something because the fields are still not presenting in the admin area when new product is clicked.

 

thoughts anyone???

 

 

 

PS - where'd the blue guy go???? he'll be missed :lol:

Link to comment
Share on other sites

well I corrected the customer view error - however now it states:

 

Warning: Failed opening 'includes/modules/product_listing.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site35/fst/var/www/html/default.php on line 295

 

 

the error:

 

1054 - Unknown column 'p.products_upc' in 'field list'

 

 

still presents in admin

 

 

thoughts please???

Link to comment
Share on other sites

Hi Ruby

 

I think you do have to ahack the file a tad to get it to work.

That was one thing that needed o be changed to make it work with the latest snapshot.

 

If I remember correctly it is something to do with the array.

Not completely sure tho...

I should have just done it again, that would have helped....

 

CC.

 

P.S. - Burk (The blue guy) is from a kids cartoon in the UK years ago called Trap Door. :wink:

He has now gone to the big cartoon show in the sky...

It's just our company logo now, till I get bored with that as my avatar anyhow.

Link to comment
Share on other sites

First and foremost - Good bye to Trap Door and may he bring happiness to all children in his new home.... :wink:

 

So I have been "tweaking" this code all night and am down to the final concern - in the admin area, when I try to edit a current product, I receive this error:

 

Fatal error: Call to undefined function: tep_get_products_upc() in /home/virtual/site35/fst/var/www/html/catalog/admin/categories.php on line 567

 

under the product description - I obviously forgot something but am not quite sure where to go with this - any ideas?

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