Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Contribution: Additional (category+manufacturer) info


erisen

Recommended Posts

Hello All,

I have just posted my very first contribution. I tried to make it as elegant as possible. Sorry if I made any mistekes.....

 

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

 

This contribution will let you enter a description for the manufacturer and /or a given category.

 

This description that you have entered will be displayed in the products info page as an attachment to the product.

 

So, you do not have to repeat the same information for the manufacturer over and over in the product description. :)

 

Please let me know how it works......

GALATASARAY RULES!

ultrAslan - ultrAslan - ultrAslan

Link to comment
Share on other sites

I was just thing about trying something like this :) I will try and get it installed this evening and let you know how it goes. What version of osc did you build it on?

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Let me get this straight- Does this mod mean that when my customer clicks on a category- I can have a block of text at the top that describes the category????

It's JUST what I was looking for!

do you think I could make it work with version 1.0.2?

psst... wanna buy a wand?

Link to comment
Share on other sites

I test your script, but there is only this problem

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /www/......./.........................../includes/functions/database.php:13) in /www/......./................../includes/functions/database.php on line 13

 

 

but it works............

 

 

Also i try a little modificated as additional metatags in keywords..........

Link to comment
Share on other sites

I test your script, but there is only this problem

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /www/......./.........................../includes/functions/database.php:13) in /www/......./................../includes/functions/database.php on line 13

 

 

but it works............

 

 

Also i try a little modificated as additional metatags in keywords..........

 

Hello,

What version are you on? Usually the the error that you have mentioned happens, if you do have the function definition parsed twice. If your version is not 2.2 MS1 or newer, it could just be it.

My code (additional_description.php) calls the /includes/application_top.php that has a call to

// include the database functions

require(DIR_WS_FUNCTIONS . 'database.php');

 

I would recommend that you can change this line in the applications_top.php file to read:

// include the database functions

require_once(DIR_WS_FUNCTIONS . 'database.php');

 

I hope this helps...

 

Mehemt.

GALATASARAY RULES!

ultrAslan - ultrAslan - ultrAslan

Link to comment
Share on other sites

Let me get this straight- Does this mod mean that when my customer clicks on a category- I can have a block of text at the top that describes the category????

It's JUST what I was looking for!  

do you think I could make it work with version 1.0.2?

 

Hello Dragonmom,

I have never seen the 1.0.2 Version of oscommerce, so anything I say would be speculation.

 

To answer you question the short way: NO. It displays the category and manufacturers info at the bottom of the product description.

 

Good news is, it's not too hard to make it show the category info at the category header.

 

The text that you enter in the form is stored in the database in the table that you are creating.

 

the column context is either CATEGORY or MANUFACTURER.

 

The context_value is then either category_id or manufacturer_id.

 

Therefore, a simple query:

select additional_description

from additional_desc_info

where context='CATEGORY'

and context_value = '$category_id'

and language = '$language'

 

should pull the category description.

 

All you have to do is to display it....

 

The above query assumes that $language is an already defined variable in the environment (ie. english).

 

once again, I am not familiar at all w/ 1.02. so sorry no comments on that.

 

Kindest Regards,

Mehmet.

 

 

You probably noticed that there is a language column...

 

So, I hope you got the idea.... If you like to display the description @the category hea

GALATASARAY RULES!

ultrAslan - ultrAslan - ultrAslan

Link to comment
Share on other sites

Hi Dragonmom,

Look what I found....

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

 

The desc says it's been designed for service seller, but here it goes:

 

 

The Category Descriptions contribution allows full-text descriptions for categories in a manner nearly identical to that for products. In addition, the HEADING_TITLE (found in the defaults.php file under the languages path catalog/includes/languages/LANG/default.php) can be replaced with different language-specific text for each category. This contribution was programmed for a site that sells services instead of physical products, which are difficult to find pictures for

GALATASARAY RULES!

ultrAslan - ultrAslan - ultrAslan

Link to comment
Share on other sites

Hi Mehmet

 

My Version is the loaded5. But its updatet to the ms1 code. If i try your code i get this:

 

Fatal error: Cannot redeclare class logger in /www/......./......../shop/admin/includes/classes/logger.php on line 13

 

But it works also with the old bug.........

Link to comment
Share on other sites

I am getting this error too :o and I am using MS1 [Cannot redeclare tep_db_connect...] I also have osC affiliates installed. and header tag controller + download controller. Is any of the above has to do with this :?:

Link to comment
Share on other sites

I am getting this error too :o and I am using MS1 [Cannot redeclare tep_db_connect...] I also have osC affiliates installed. and header tag controller + download controller. Is any of the above has to do with this :?:

 

Hi,

Can you try this for me:

 

in the file

admin/additional_description.php

please change

 

the following (that's the first line after the header.

 

require('includes/application_top.php');

 

 

to

 

require_once('includes/application_top.php');

 

Let see if fixes the problem. If it does fix your problem I will release a patch.

GALATASARAY RULES!

ultrAslan - ultrAslan - ultrAslan

Link to comment
Share on other sites

Hi,

Can you try this for me:

 

in the file

admin/additional_description.php

please change  

 

the following (that's the first line after the header.

 

require('includes/application_top.php');

 

 

to

 

require_once('includes/application_top.php');

 

Let see if fixes the problem. If it does fix your problem I will release a patch.

 

I did the same but still getting this error

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/us/public_html/catalog/admin/includes/functions/database.php:13) in /home/us/public_html/catalog/admin/includes/functions/database.php on line 13

 

even tried clearing my browser cache but still have the same error :(

Link to comment
Share on other sites

  • 3 weeks later...
I test your script, but there is only this problem

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /www/......./.........................../includes/functions/database.php:13) in /www/......./................../includes/functions/database.php on line 13

 

 

but it works............

 

 

Also i try a little modificated as additional metatags in keywords..........

 

The problem is in the admin/additional_descriptions.php file. The script is entered into the file twice...looks like a newer version (1.5) pasted at the top of an earlier version (1.1)? Anyway, delete the older version which starts halfway through the file and it works great.

 

Thanks to Werner for the tip off here:

 

http://www.oscommerce.com/forums/viewtopic.php...t=44308&start=0

 

Joe

Link to comment
Share on other sites

Wow.. I don't know how I posted such silly file with my contribution and did not realize what I have done.

 

sorry all.

 

I have posted the corrected version of the file. Please download from

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

 

If you already have it insalled, all you have to do is to copy the admin/additional_description.php file.

 

Thanks and Regards,

Mehmet.

GALATASARAY RULES!

ultrAslan - ultrAslan - ultrAslan

Link to comment
Share on other sites

  • 2 weeks later...

Got your contribution all set up, but when I add some details to the box in admin I get:

 

"1065 - Query was empty" any ideas?

Link to comment
Share on other sites

  • 3 weeks later...

I was able to get the contribution installed and operating with no trouble. Just to let folks know.

 

Unfortunately it won't work for me due to my layout. My categories/subcategories can have the same name (a manufacturer) so I see the same name listed many times, and I don't know which category/sub category it is for :(

 

I'm trying to install the other cat description mod refernced earlier in the thread, but with difficulties.

 

All in all the contibution looks like it will work good for many people, and is not too difficult to install.

 

:)

Steve K AKA - Knipper -

Link to comment
Share on other sites

  • 5 months later...
  • 4 months later...

Hello this is my first post to this forum.

I have installed

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

Great idea I needed it for a site I am working on

 

I seem to have the same problem as some others

 

Fatal error: Cannot redeclare tep_redirect() (previously declared in /home/virtual/site72/fst/var/www/html/catalog/admin/includes/functions/general.php:15) in /home/virtual/site72/fst/var/www/html/catalog/admin/includes/functions/general.php on line 15

 

I have read thru a few reposts and also tried changing

 

// include the database functions

require(DIR_WS_FUNCTIONS . 'database.php');

 

to

 

require_once(DIR_WS_FUNCTIONS . 'database.php');

 

still, no luck. Any other suggestions..? TIA

(sorry for any errors in posting)

Link to comment
Share on other sites

I have read thru a few reposts and also tried changing

 

// include the database functions

require(DIR_WS_FUNCTIONS . 'database.php');

 

to

 

require_once(DIR_WS_FUNCTIONS . 'database.php');

 

still, no luck. Any other suggestions..? TIA

(sorry for any errors in posting)

Perhaps database.php has already been called (it is in application_top.php) when your alteration is parsed? try commenting it:

 

// include the database functions
// require(DIR_WS_FUNCTIONS . 'database.php');

 

I am not familiar with this contribution, but if the file that is causing this error is included by another, then the call require('includes/application_top.php'); is not needed - perhaps this is the problem and should be commented - do not comment require(DIR_WS_FUNCTIONS . 'database.php'); in application_top.php, only if its in your contribution file.

 

Matti

Edited by Johnson
Link to comment
Share on other sites

  • 2 years later...

Hi there. I've installed the contribution but seem to be having a different problem.

 

In my admin/additional_description.php file all I get is a drop down menu with

 

Additional Description Manager

 

> CATEGORY

> CATLEVEL

> MANUFACTURER

 

and no text field to enter the additional info. Any idea what is causing this?

 

thx in advance

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