Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Assistance with adding extra details to Product Info


kense

Recommended Posts

Long time lurker, haven't posted for a while...

 

I'm looking for assistance with adding extra information to individual product pages...

 

The site I'm currently developing has mainly whitespace on the individual product pages, and I was hoping to help fill this with some technical specifications of the products.

 

This may be just as simple as adding extra fields to the product descriptions, but is hindered by the following:

 

> The product information and descriptions are currently exported from a database program as a .csv file, and I am not able to edit either the .csv file or the database software itself to be able to specify the extra technical specs as extra information to send to the database.

 

> There are a large number of different products with very similar but slightly different specifications, and entering each different spec to each individual product would be incredibly long-winded.

 

I was hoping, therefore, to create an Excel spreadsheet containing all of the technical specs, and then draw certain items of data from that spreadsheet depending on which product was being viewed, and display that information in some kind of uniform manner across the different products.

 

I have found this contribution from That Software Guy which shows how to link to a html file, specified by whichever product is being viewed, and think that what I am looking to do would be similar in concept. Not quite the same, though.

 

I'm suggesting using Excel simply because it's much easier to create a table of all of the different products' specifications that way (in fact, it's already created). I'm fairly certain with enough Googling I could find out how to display data from Excel on a web page, but perhaps someone has already had experience of this and is able to offer advice?

 

Has anyone come across anything similar to this in the past, or have an idea about who might be able to assist?

 

Failing that, any ideas of alternative ways of doing this?

Link to comment
Share on other sites

if you just need to add extra info, you can look into product extra fields (I think there is an easypopulate contribution for)

 

if you also need filteren on specifications, look at product specifications contribution

I've an easypopulate customized to bulk import/update product specs

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

@@kense I suggest you use the Add More Fields and Easy Populate addons. Add More Fields will update Easy Populate for you automatically so you don't have to worry about getting it to load the fields. Once Easy Populate is setup, you just have to change the entries for the new fields and upload.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi - if you were to save your Excel sheet as a csv then upload it you could tailor in some PHP code using fgetcsv or else look at flat file handling. You'd need something in the csv that matches something in the osC code - product_id, sku, anything that is unique - then you have a little chunk of code in your product_info page that goes off, looks at the csv and pulls back anything relevant?

Link to comment
Share on other sites

Hi - if you were to save your Excel sheet as a csv then upload it you could tailor in some PHP code using fgetcsv or else look at flat file handling. You'd need something in the csv that matches something in the osC code - product_id, sku, anything that is unique - then you have a little chunk of code in your product_info page that goes off, looks at the csv and pulls back anything relevant?

That's where I'm thinking this is heading... I've been researching the fgetcsv and str_getcsv functions.

 

The Excel sheet has a column with the product_id number, which is currently being displayed by osC as the 'smalltext' beneath the name of the product.

 

Any idea how I'd target it to be able to use it as the parameter for the fgetcsv?

Link to comment
Share on other sites

That's where I'm thinking this is heading... I've been researching the fgetcsv and str_getcsv functions.

 

The Excel sheet has a column with the product_id number, which is currently being displayed by osC as the 'smalltext' beneath the name of the product.

 

Any idea how I'd target it to be able to use it as the parameter for the fgetcsv?

 

I think osC is creating the smallText using $product_info['products_model'] in the product_info.php file...?

 

But I'm not familiar enough with fgetcsv to be able to achieve what I want, and don't know how to use this as the key to find and display the data that I need.

Link to comment
Share on other sites

Have a look at http://addons.oscommerce.com/info/8368 which might give you the right direction for how to get and work with data from a CSV file. Note that this is a shipping module and so is not right for what you want, but may give you a pointer.

 

Thanks Burt, I've had a look but can't figure out how to pull it or subsequently display it.

Link to comment
Share on other sites

You might just create some extra db tables for this export in the excel/csv file to those...then its a "snap" to have it show on the product info page.

Link to comment
Share on other sites

As always Easy Populate does exactly what you want. Except filtering.

 

Easy Pop instructions also show you how to add extra fields. For the new field to appear use

 

<?php echo stripslashes($product_info['products_description']); ?>

 

and change "description" to the name of your new field and paste it in where you want it to show on the product_info page.

 

I wrote this a while back on a heavily modded store so I dont know how accurate the line refs are. http://www.oscommerce.com/forums/topic/371614-add-new-fields-to-the-product-description-easily/

Link to comment
Share on other sites

I think perhaps I wasn't so clear in my original explanation...

 

The products and the normal product information (description etc) are generated by a database software program that pumps out a CSV file when the administrator clicks 'update'... I am limited by the fields that are contained on that database program as to what information I can include in that CSV file.

 

This extra table of dimensions will need to be created from a second separate CSV file, which will be static and held on the server to refer to... So this will be a second, separate draw of information from a second CSV file that product_info.php will be performing.

 

Does that make sense?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...