Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

has anyone tried Articles Module v1.0?


rubygirl

Recommended Posts

This is your article_app_top.php

 

<?php

 //Articles_Module_v0222

 //Storefront Side



 // Articles Box: recursive articles count

 define('SHOW_ARTICLE_COUNTS', 'true'); // show category count: true=Yes False=No

 define('USE_RECURSIVE_ARTICLE_COUNT', 'true'); // recursive count: true=Yes False=No



// calculate Article Category path

 if ($HTTP_GET_VARS['cArticlePath']) {

   $cArticlePath = $HTTP_GET_VARS['cArticlePath'];

 } elseif ($HTTP_GET_VARS['articles_id'] && !$HTTP_GET_VARS['manufacturers_id']) {

   $cArticlePath = tep_get_article_path($HTTP_GET_VARS['articles_id']);

 } else {

   $cArticlePath = '';

 }

 if (strlen($cArticlePath) > 0) {

   $cArticlePath_array = array_map('tep_string_to_int', explode('_', $cArticlePath));

   $cArticlePath = implode('_', $cArticlePath_array);

   $current_articlecategory_id = $cArticlePath_array[(sizeof($cArticlePath_array)-1)];

 } else {

   $current_articlecategory_id = 0;

 }



 //require(DIR_WS_CLASSES . 'breadcrumb.php');

 $articlebreadcrumb = new breadcrumb;



 $articlebreadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 $articlebreadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULTARTICLE));



 if (isset($cArticlePath_array)) {

   for($i=0; $i<sizeof($cArticlePath_array); $i++) {

     $articlecat_query = tep_db_query("select articlecat_name from " . TABLE_ARTICLECAT_DESCRIPTION . " where articlecat_id = '" . $cArticlePath_array[$i] . "' and language_id='" . $languages_id . "'");

     //echo($cArticlePath_array[$i]."-Chad2");

  $articlecat = tep_db_fetch_array($articlecat_query);

     $articlebreadcrumb->add($articlecat['articlecat_name'], tep_href_link(FILENAME_DEFAULTARTICLE, 'cArticlePath=' . implode('_', array_slice($cArticlePath_array, 0, ($i+1)))));

   }

 } elseif ($HTTP_GET_VARS['manufacturers_id']) {

   $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'");

   $manufacturers = tep_db_fetch_array($manufacturers_query);

   $articlebreadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULTARTICLE, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']));

 }



 if ($HTTP_GET_VARS['articles_id']) {

   $model_query = tep_db_query("select articles_model from " . TABLE_ARTICLES . " where articles_id = '" . $HTTP_GET_VARS['articles_id'] . "'");

   $model = tep_db_fetch_array($model_query);

   $articlebreadcrumb->add($model['articles_model'], tep_href_link(FILENAME_ARTICLE_INFO, 'cArticlePath=' . $cArticlePath . '&articles_id=' . $HTTP_GET_VARS['articles_id']));

 }

//*****************************END articles ************************************

?>

Link to comment
Share on other sites

  • Replies 179
  • Created
  • Last Reply

Top Posters In This Topic

Well I found the problem my FTP must of failed re-uploaded the file and it seems to work now...

 

I am still having some other issues but things are getting better...

 

Thanks for your help and if I have any other questions I will post them.

Link to comment
Share on other sites

OK Next question when I work in the admin area I always get

 

the following explorer message

 

This page contains both secure and nonsecure items

Do you want to display the nonsecure items?

 

yes No More Info

 

is this normal?

 

This also happens when you write a review.

Link to comment
Share on other sites

found somthing I think need to go in the readme file for the install

 

this was left out in the instructions

 

<!-- Adding HTMLArea - iPLANIT Change -->

<!-- ---------------------------------------------------------------------- -->

<!-- START : EDITOR HEADER - INCLUDE THIS IN ANY FILES USING EDITOR -->

<script language="Javascript1.2" src="http://www.ewine.ie/2.2/htmlarea/editor.js"></script>

<script>

// set this to the URL of editor direcory (with trailing forward slash)

// NOTE: _editor_url MUST be on the same domain as this page or the popups

// won't work (due to IE cross frame/cross window security restrictions).

// example: http://www.hostname.com/editor/



_editor_url = "https://www.yourdomain.com/catalog/admin/htmlarea/";

</script>

<style type="text/css"><!--

 .btn   { BORDER-WIDTH: 1; width: 26px; height: 24px; }

 .btnDN { BORDER-WIDTH: 1; width: 26px; height: 24px; BORDER-STYLE: inset; BACKGROUND-COLOR: buttonhighlight; }

 .btnNA { BORDER-WIDTH: 1; width: 26px; height: 24px; filter: alpha(opacity=25); }

--></style>

<!-- END : EDITOR HEADER -->

<!-- ---------------------------------------------------------------------- -->

 

it is the edit for editor in the articlecat.php file

Link to comment
Share on other sites

ahhh no wonder .. your using an older version .. that has been taken out of the new one

 

well that way to call the editor has been .. I didn't like the idea of going to another site should be all contained

(my knowledge is so small you would think that an ant was a genius in comparison)

Link to comment
Share on other sites

try this where the other was .. should fix the problem ..

the title and the link are just where this is .. copied them for reference

 

 

<title> <?php echo TITLE; ?> </title>

<!-- Adding HTMLArea - iPLANIT Change -->

<!-- ---------------------------------------------------------------------- -->

<!-- START : EDITOR HEADER - INCLUDE THIS IN ANY FILES USING EDITOR -->

<script language="Javascript1.2" src="<?php echo HTTP_CATALOG_SERVER . DIR_WS_ADMIN . 'editor.js' ?>"></script>

<script>

// set this to the URL of editor direcory (with trailing forward slash)

// NOTE: _editor_url MUST be on the same domain as this page or the popups

// won't work (due to IE cross frame/cross window security restrictions).

// example: http://www.hostname.com/editor/

 

_editor_url = "<?php echo HTTP_CATALOG_SERVER . DIR_WS_ADMIN .DIR_WS_HTML_AREA ?>";

</script>

<style type="text/css"><!--

.btn { BORDER-WIDTH: 1; width: 26px; height: 24px; }

.btnDN { BORDER-WIDTH: 1; width: 26px; height: 24px; BORDER-STYLE: inset; BACKGROUND-COLOR: buttonhighlight; }

.btnNA { BORDER-WIDTH: 1; width: 26px; height: 24px; filter: alpha(opacity=25); }

--></style>

<!-- END : EDITOR HEADER -->

<!-- ---------------------------------------------------------------------- -->

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

(my knowledge is so small you would think that an ant was a genius in comparison)

Link to comment
Share on other sites

Thanks I just hooked in htmlarea v2.03 much better less files and works better.

 

The next attemp will be to use the 3.0 version that has a spell checker and better table support.

 

I just deleted the old htmlarea and installed the new version and eveything works... with only one problem I still get that secure page error I wish I could figure that out.

 

This is a really nice mod the only comment I have is the pathing you used. Because many user of this software do no install it in the default catalog dir and because configure.php can vary in many ways I think it may be better not to base your code on them.

 

I know you used the product module to base your mod on which provides a great deal of power but at the same time you may want to create better comments in the code. The OSC would be much easier to support and develop mods for if the OSC dev staff would comment the work in the application.

 

Anyways You did a great job and I love the mod thanks for putting all the time into it and also for helping me.

 

Shawn

Link to comment
Share on other sites

  • 2 weeks later...

I am receiving the following error when trying to display the articles on the front end:

 

1146 - Table 'gameguys_catalog2.TABLE_ARTICLECAT' doesn't exist

 

select c.articlecat_id, cd.articlecat_name, c.parent_id from TABLE_ARTICLECAT c, TABLE_ARTICLECAT_DESCRIPTION cd where c.parent_id = '0' and c.articlecat_id = cd.articlecat_id and cd.language_id='1' order by sort_order, cd.articlecat_name

 

[TEP STOP]

 

In the admin, I am receiving the following error:

 

1146 - Table 'gameguys_catalog2.TABLE_ARTICLECAT' doesn't exist

 

select c.articlecat_id, cd.articlecat_name, c.parent_id from TABLE_ARTICLECAT c, TABLE_ARTICLECAT_DESCRIPTION cd where c.articlecat_id = cd.articlecat_id and cd.language_id = '1' and c.parent_id = '0' order by c.sort_order, cd.articlecat_name

 

[TEP STOP]

 

I have uninstalled and re-installed the database tables twice. Anyone have a clue what's wrong here? I assume it's a simple missed keystroke... somewhere!

Link to comment
Share on other sites

Hi Everyone,

 

Hope you can help, because I've had no luck finding enough on the forum to help me fix my issues.

 

I installed SEC 2.2 last week and had it working correctly. Now I'm working on adding the Article_module_v0222. So far I've had no luck getting the site to work properly after attempting this.

 

When I go to my catalog page I get the following:

 

Fatal error: Cannot redeclare tep_get_manufacturers_name() (previously declared in /home/jewelryi/public_html/includes/functions/webmakers_added_functions.php:172) in /home/jewelryi/public_html/includes/functions/articles_general.php on line 141

 

When I go to my admin page I get the following:

 

Warning: main(includes/articles_filenames.php): failed to open stream: No such file or directory in /home/jewelryi/public_html/dante/includes/filenames.php on line 106

 

Fatal error: main(): Failed opening required 'includes/articles_filenames.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/jewelryi/public_html/dante/includes/filenames.php on line 106

 

 

I've looked at the install instructions and believe I have everything set up as it should be. Could it be a compatibility issue with Articles and SEC? I am fairly new to this stuff, so maybe I'm missing something obviouse. Please help if you can.

 

Cheers,

 

Dave

Link to comment
Share on other sites

Hi,

 

I installed this contribution. The admin works fine, but as soon as i click on a article (category) i get this error:

 

Fatal error: Cannot redeclare tep_show_articlecategory() (previously declared in /www/htdocs/alphatec/catalog/includes/boxes/articlecat.php:13) in /www/htdocs/alphatec/catalog/includes/boxes/articlecat.php on line 13

 

I get the same error if i want to register as a new customer.

 

i searched every file in the catalog directory, but "show_articlecategry" shows up only once: on line 13 of articlecat.php

 

Do you have an idea on how to solve this? I would be very greatful! :rolleyes:

 

If you want to look for your self : www.alphatech.nu/catalog/index.php

 

 

Thank you all!

Koen Boekelo

Link to comment
Share on other sites

  • 3 weeks later...

Thank you to all who worked on this contribution I installed it and it worked smoothly first try (well second try after I uploaded ALL the files duhh)

 

My only query is how to change the headings that appear like the following:

 

SUB_TITLE_ARTICLE (this appears when you click to write a review on an article)

 

But in any regard this whole experience with OScommerce and the support community has been exceptional, we are almost ready to launch our site!

Im why they put the !ACK! in hack

Link to comment
Share on other sites

Hello all,

 

I'm working hard on this contribution, found some open problems and solving them :).

 

e.g.

- Redefine search machine to find Keywords in products and articles

- Find some other little bugs

 

Currently I stuck with following problem:

- If clicking in articles categories box, subcategory opens,... until clicking to show article info.

 

But, as detailed article info opens, the categories tree implodes to parent entrys. Therefore to switch to next article in this category, user has to reclick all the tree entries. Same problem if you directly jump to detailed article via browser command line - the category path is not opened, therefore nobody knows from where the article is coming :(

 

Anyone has the same problem???

 

If this solved, I want to publish my changes for community - one of the best contributions!!!

 

greets

 

Aplrapid

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