Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Manufacturer to Author - Redux


kelagedart

Recommended Posts

Posted

This is in some ways a continuation from my prior Advanced Search thread, which was of enormous help to me in getting such a required function working correctly. (Apparently many private sites have problems with their search engines being efficient, but OSC has the tools and addons to overcome any of those deficiences from what I have seen)

 

As a bookseller the manufacturer (publisher) is not such a paramount issue as it might be with brand new consumer items. Even people looking for a First Edition of Moby Dick may not have the slightest clue of who the publisher actually was. Particularly for us booksellers who do NOT sell *new* books.

 

I have looked into prior threads regarding converting manufacturer to author threads and most seem cosmetic: just changing the heading titles when displayed. I need something a little more complex. For one, on the product and search displays I would like to display author instead of 'manufacturer' - from its own field. It is also inserted into the description field and so is searchable from there alone, but for product display as well as perhaps for other future functions it is a good thing for the author data to have its own field.

 

Let me explain.

All of my data is entered via a perl script, where the product_description table has been expanded to include an author field. So the data is there:

 

$sql_st2 = qq!INSERT INTO products_description VALUES($q{BOOK}, '1', "$q{ANAM}", "$q{TNAM}",!; and rest of standard fields.

Author is 'ANAM'

 

The manufacturer fields are not used at all, and currently defaults to the stock products.

 

Manufacturers has two tables:

 

MANUFACTURERS:

manufacturers_id

manufacturers_name

manufacturers_image

date_added

last_modified

 

MANUFACTURERS_INFO:

manufacturers_id

languages_id

manufacturers_url

url_checked

date_last_click

 

The populated fields of interest are in-

 

PRODUCTS_DESCRIPTION:

products_id

language_id

author

products_name

products_description

products_url

products_viewed

pub_info

isbn_13

keywords

 

So what I would like to do is copy:

PRODUCTS_DESCRIPTION/products_id -> MANUFACTURERS/manufacturers_id ; MANUFACTURERS_INFO/manufacturers_id

PRODUCTS_DESCRIPTION/author -> MANUFACTURERS/manufacturers_name

 

AND if there should be any interest-

To make things interesting it would be nice to have

MANUFACTURERS_INFO/manufacturers_url default to http://en.wikipedia.org/wiki/[author]

And not display if there is no matching article.

This is for many of the obscure antiquarian authors, and may be of great help in the Manufacturers Info box.

 

The ultimate would be to have :

MANUFACTURERS/manufacturers_image display the first image it sees on the page, but this may reuire too much coding. (And unnecessary if they click on the author link)

 

Now the obvious question would be how to copy the subtables over to the regular Manufacturers tables.

Whether this can be done automatically with a regular PHP script, or whether modifications need to be done to the Perl script itself.

 

PHP would probably be the preferable choice.

One particular reason for this is that the script uses DBD:MySQL which is easy on Linux but a positive bear to install and configure on Windoze. No go with ActiveState Perl. Or Cygwin. Strawberry Perl, and some *very* obscure compilation patches were required, as well as an OLDER version of the module.

 

I can post it if there is interest.

It would also be a great idea to get some kind of group here together on a common project, becuase this is really about more than books, as these issues extend into the collectibles market itself, and particularly thoise of us with rather large databases. Imagine if a stamp or coin or post card dealer wanted to use stock OSC, and had to opertate off a database that was not particularly Excel compatible for EasyPopulate.

The script output, being pure MySQL also dould not have any PHP timeouts and memory issues to be concerned about.

 

I would also be intrested in getting together a general template for booksellers, particularly Out of Print ones, and hopefully get some momentum from the ABE bookseller forum where I have been promoting OSCommerce, and folks are interested, but mainly in something that basically works out of the box, and can be modified afterwards.

Our largely Access and Filemaker derived databases do not play too nicely with Easypopulate.

Archived

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

×
×
  • Create New...