Jump to content
Sign in to follow this  
erisen

New Contribution: Additional (category+manufacturer) info

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

Share this post


Link to post
Share on other sites

great. I hope you'll like it.


GALATASARAY RULES!

ultrAslan - ultrAslan - ultrAslan

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

Hello,

I have the 2.2 MS1 installed, so that's the version I have built it on.

Erisen.


GALATASARAY RULES!

ultrAslan - ultrAslan - ultrAslan

Share this post


Link to post
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?

Share this post


Link to post
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..........

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.........

Share this post


Link to post
Share on other sites

Thank you Erisen!

I saw that contribution - but I'm still a newbie and I didn't quite understand what it meant. you are very kind to bring it to my attention!


psst... wanna buy a wand?

Share this post


Link to post
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 :?:

Share this post


Link to post
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

Share this post


Link to post
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 :(

Share this post


Link to post
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..........

 

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://forums.oscommerce.com/viewtopic.php...t=44308&start=0

 

Joe

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 -

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
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

Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites

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

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  

×