Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Links Manager v1.01, please help???


panzz

Recommended Posts

Hi there,

 

I?m running into a problem. The installation worked fine, and I can add categories and links and they are all saved in the proper tables (as I can see via phpMyAdmin). But when I go to the catalog and call the section "links", only the link categories are shown, but no links!

 

Also, in the admin section, there is no entry offer for [option ->] status."

 

What is going wrong?

 

Thanks & Greets from Germany.

 

Panzz

Link to comment
Share on other sites

  • Replies 245
  • Created
  • Last Reply

Top Posters In This Topic

the links need to be approved in the admin before becomming available.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

In the admin on the left hand side under Links Manager there should be

Links

Links Categories

Links Contact

Select Links you should see the link, select edit and at the bottom of the section that has just opened you will see Options with Status as a pull down menu, select Approved and then click the button update, this will set the link as approved so that it will show up in the catalog

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

do you have the ls_status table in your database with the following entries

 

? ? ? ? ?  links_status_id? language_id? links_status_name?

? ? ? ? ? ? ? ? ? 1? ? ? ? ? ? ? ? ? ?  1? ? ? ? ? ? ? ? Pending

? ? ? ? ? ? ? ? ? 2? ? ? ? ? ? ? ? ? ?  1? ? ? ? ? ? ? ? Approved

? ? ? ? ? ? ? ? ? 3? ? ? ? ? ? ? ? ? ?  1? ? ? ? ? ? ? ? Disabled

oder f?r Sie

 

Schwebend

Anerkannt

Untauglich

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

I thought for a minute that you were going for a live chat. :lol:

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

yes the table with this entries exist:

 

links_status_id language_id links_status_name

1 1 Pending

2 1 Approved

3 1 Disabled

 

 

But no display/entry in the pull down menu.

 

Thanks,

Panzz

Link to comment
Share on other sites

:huh: I thought that you had gone to my website for a look. :blink:

 

Which language are you using in the admin

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

therefore the resolve is to change the tables for links manager so as to have the language id set to the default language of osc for german which is 2

 

You need to set the language id in each table that has language id for the link manager contribution from 1 to 2 and set the default for the languages id in each table that has language id from 1 to 2

 

This post is more to help others that have a similar issue and are using only the one language in admin which is not english and therefore not the default 1 for language id

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hi There,

 

now I have another problem.

 

When I click on a link, I get a parse error like this:

 

Parse error: parse error, unexpected $end in C:\xampp\htdocs\shop\catalog\redirect.php on line 73

 

But line 73 don't exist in the redirect.php.

 

Here is the code:

 

<?php

/*

$Id: redirect.php,v 1.10 2003/06/05 23:31:31 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

switch ($HTTP_GET_VARS['action']) {

case 'banner':

$banner_query = tep_db_query("select banners_url from " . TABLE_BANNERS . " where banners_id = '" . (int)$HTTP_GET_VARS['goto'] . "'");

if (tep_db_num_rows($banner_query)) {

$banner = tep_db_fetch_array($banner_query);

tep_update_banner_click_count($HTTP_GET_VARS['goto']);

 

tep_redirect($banner['banners_url']);

}

break;

 

case 'url':

if (isset($HTTP_GET_VARS['goto']) && tep_not_null($HTTP_GET_VARS['goto'])) {

tep_redirect('http://' . $HTTP_GET_VARS['goto']);

}

break;

 

case 'manufacturer':

if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {

$manufacturer_query = tep_db_query("select manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id . "'");

if (tep_db_num_rows($manufacturer_query)) {

// url exists in selected language

$manufacturer = tep_db_fetch_array($manufacturer_query);

 

if (tep_not_null($manufacturer['manufacturers_url'])) {

tep_db_query("update " . TABLE_MANUFACTURERS_INFO . " set url_clicked = url_clicked+1, date_last_click = now() where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id . "'");

 

tep_redirect($manufacturer['manufacturers_url']);

}

} else {

// no url exists for the selected language, lets use the default language then

$manufacturer_query = tep_db_query("select mi.languages_id, mi.manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " mi, " . TABLE_LANGUAGES . " l where mi.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and mi.languages_id = l.languages_id and l.code = '" . DEFAULT_LANGUAGE . "'");

if (tep_db_num_rows($manufacturer_query)) {

$manufacturer = tep_db_fetch_array($manufacturer_query);

 

if (tep_not_null($manufacturer['manufacturers_url'])) {

tep_db_query("update " . TABLE_MANUFACTURERS_INFO . " set url_clicked = url_clicked+1, date_last_click = now() where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$manufacturer['languages_id'] . "'");

 

tep_redirect($manufacturer['manufacturers_url']);

}

}

}

}

break;

// VJ Links Manager v1.00 begin

case 'links':

require(DIR_WS_FUNCTIONS . 'links.php');

 

$links_query = tep_db_query("select links_url from " . TABLE_LINKS . " where links_id = '" . (int)$HTTP_GET_VARS['goto'] . "'");

if (tep_db_num_rows($links_query)) {

$link = tep_db_fetch_array($links_query);

tep_update_links_click_count($HTTP_GET_VARS['goto']);

 

tep_redirect($link['links_url']);

}

break;

// VJ Links Manager v1.00 end

 

 

 

 

Where is the error?

 

Please help.....

 

Thanks & Greets

Panzz

Edited by panzz
Link to comment
Share on other sites

how did you enter the link with or without http://

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Sorry my bad I was busy working on a contribution at time of posting

 

your code is placed wrong in the redirect.php

 

<?php
/*
?$Id: redirect.php,v 1.10 2003/06/05 23:31:31 hpdl Exp $

?osCommerce, Open Source E-Commerce Solutions
?http://www.oscommerce.com

?Copyright (c) 2003 osCommerce

?Released under the GNU General Public License
*/

?require('includes/application_top.php');

?switch ($HTTP_GET_VARS['action']) {
? ?case 'banner':
? ? ?$banner_query = tep_db_query("select banners_url from " . TABLE_BANNERS . " where banners_id = '" . (int)$HTTP_GET_VARS['goto'] . "'");
? ? ?if (tep_db_num_rows($banner_query)) {
? ? ? ?$banner = tep_db_fetch_array($banner_query);
? ? ? ?tep_update_banner_click_count($HTTP_GET_VARS['goto']);

? ? ? ?tep_redirect($banner['banners_url']);
? ? ?}
? ? ?break;

? ?case 'url':
? ? ?if (isset($HTTP_GET_VARS['goto']) && tep_not_null($HTTP_GET_VARS['goto'])) {
? ? ? ?tep_redirect('http://' . $HTTP_GET_VARS['goto']);
? ? ?}
? ? ?break;

// VJ Links Manager v1.00 begin
? ?case 'links':
? ? ?require(DIR_WS_FUNCTIONS . 'links.php');

? ? ?$links_query = tep_db_query("select links_url from " . TABLE_LINKS . " where links_id = '" . (int)$HTTP_GET_VARS['goto'] . "'");
? ? ?if (tep_db_num_rows($links_query)) {
? ? ? ?$link = tep_db_fetch_array($links_query);
? ? ? ?tep_update_links_click_count($HTTP_GET_VARS['goto']);

? ? ? ?tep_redirect($link['links_url']);
? ? ?}
? ? ?break;
// VJ Links Manager v1.00 end

? ?case 'manufacturer':
? ? ?if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
? ? ? ?$manufacturer_query = tep_db_query("select manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id . "'");
? ? ? ?if (tep_db_num_rows($manufacturer_query)) {
// url exists in selected language
? ? ? ? ?$manufacturer = tep_db_fetch_array($manufacturer_query);

? ? ? ? ?if (tep_not_null($manufacturer['manufacturers_url'])) {
? ? ? ? ? ?tep_db_query("update " . TABLE_MANUFACTURERS_INFO . " set url_clicked = url_clicked+1, date_last_click = now() where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id . "'");

? ? ? ? ? ?tep_redirect($manufacturer['manufacturers_url']);
? ? ? ? ?}
? ? ? ?} else {
// no url exists for the selected language, lets use the default language then
? ? ? ? ?$manufacturer_query = tep_db_query("select mi.languages_id, mi.manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " mi, " . TABLE_LANGUAGES . " l where mi.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and mi.languages_id = l.languages_id and l.code = '" . DEFAULT_LANGUAGE . "'");
? ? ? ? ?if (tep_db_num_rows($manufacturer_query)) {
? ? ? ? ? ?$manufacturer = tep_db_fetch_array($manufacturer_query);

? ? ? ? ? ?if (tep_not_null($manufacturer['manufacturers_url'])) {
? ? ? ? ? ? ?tep_db_query("update " . TABLE_MANUFACTURERS_INFO . " set url_clicked = url_clicked+1, date_last_click = now() where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$manufacturer['languages_id'] . "'");

? ? ? ? ? ? ?tep_redirect($manufacturer['manufacturers_url']);
? ? ? ? ? ?}
? ? ? ? ?}
? ? ? ?}
? ? ?}
? ? ?break;
?}

?tep_redirect(tep_href_link(FILENAME_DEFAULT));
?>

 

the above is my redirect.php notice that the links redirect statements are placed above the end set of } . You can place the code after the manufacturers part but you need to be aware of the placement with regard to all the closing { or maybe you are missing the last 2 lines in your post

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hi Steve,

 

no problem, I have enough time :)

 

Your redirect.php code works very good for me, every link works now correct!

 

Many thanks!!!

 

Greets from Germany

 

Panzz

Link to comment
Share on other sites

Hi Steve,

 

now I have a new Problem with the links manager.

 

All works on now fine on my local sytem. I have installed now the Links Manager on my Onlineshop. Installation an all other works fine, but when I click on the links -> Link, I got the following error message:

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /homepages/14/d13488967/htdocs/shop/catalog/includes/functions/database.php:13) in /homepages/14/d13488967/htdocs/shop/catalog/includes/functions/database.php on line 13

 

What is to do???

 

Thanks & Greets

Panzz

Link to comment
Share on other sites

Hi@all,

 

everything works now.

 

I have upped a *.php file in the wrong folder.

 

Here is an instruction about this error message, but only in German.

 

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

Problembeschreibung 

Obiger Fehler tritt immer dann auf, wenn die Datei database.php mehrmals in ein PHP-Skript eingebunden wird. Die Fehlermeldung gibt allerdings keine Auskunft dar?ber, wo die Datei ein zweites Mal eingebunden wird. Das macht es u.U. sehr schwer, den eigentlichen Fehler zu finden. 

Beispiel 1: 
Mehrmaliges Einbinden der Datei database.php in der Datei application_top.php.Code: 
require(DIR_WS_FUNCTIONS . 'database.php'); 
... 
require(DIR_WS_FUNCTIONS . 'database.php'); 



Beispiel 2: 
Oftmals wird auch in einer Datei aus dem catalog Ordner (index.php, products_info.php etc.) mehrmals die Datei application.top eingebunden.Code: 
require('includes/application_top.php'); 
... 
require('includes/application_top.php'); 


Beispiel 3: 
Eine weitere h?ufige Ursache f?r den Fehler ist der Umstand, da? Dateien aus dem catalog-Verzeichnis versehentlich in den Ordner includes/langages/sprache hochgeladen wurden. Dies hat dann zur Folge, da? anstatt der Datei mit den Sprachdefinitionen die eigentliche Datei aus dem catalog-Verzeichnis eingebunden wird. 

Alle Fehler, die oben beschrieben wurden, f?hren zu einer identischen Fehlermeldung. Ungl?cklicherweise sind noch viel schwerer zu entdeckende "Einbindungsketten" denkbar.

 

Greets,

Panzz

 

P.S. Many thanks to Steve (241) for the HELP!!!

Edited by panzz
Link to comment
Share on other sites

so you would be saying in your case that it was example 3 uploading the wrong file from catalog to the languages directory rather than a duplicate call in applications_top.php

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

  • 2 weeks later...

Im having the problem of links showing up after clicking into the categories as well. Ive checked the DB and the links are approved. The submited links show up in the admin, emails are sent but the links arent showing up...

 

Heres how the links are showing in the browser...

 

http://thewebsite.com/links.php/lPath/2

 

This is the second category I created.

 

The page also shows Displaying 1 to 2 (of 2 links)

 

Ill post my code if needed...

 

$Id: links.php,v 1.00 2003/10/03 Exp $

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.
Note: Your post will require moderator approval before it will be visible.

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