Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

you could use the database entries for articles. Once you retrieve an article you call tep_href_link and construct the link. That function will create a session for the article link

 

Thanks for the reply, I have tried that and I cant get specific articles to load. Do you have an example that you could post so I know how to do it? I am only having troubles with the article links for some reason.

 

Any help would be great,

Jamie

Link to comment
Share on other sites

Can anyone help? I have tried all the usual links but its not working. Can someone please post some code that should work?

 

Thank you very much,

Jamie

Link to comment
Share on other sites

I can not get any of the files (yahoo.php, froogle.php bizrate.php) to work - here is what I get with Yahoo:

 

: SQL error Unknown column 'products.manufacturers_id' in 'on clause'| sql = SELECT concat( 'http://localhost/product_info.php?products_id=' ,products.products_id) AS product_url, products_model AS prodModel, products_weight, manufacturers.manufacturers_name AS mfgName, manufacturers.manufacturers_id, products.products_id AS id, products_description.products_name AS name, products_description.products_description AS description, products.products_quantity AS quantity, products.products_status AS prodStatus, FORMAT( IFNULL(specials.specials_new_products_price, products.products_price) * 1,2) AS price, CONCAT( 'http://localhost/images/' ,products.products_image) AS image_url, products_to_categories.categories_id AS prodCatID, categories.parent_id AS catParentID, categories_description.categories_name AS catName FROM categories, categories_description, products, products_description, products_to_categories left join manufacturers on ( manufacturers.manufacturers_id = products.manufacturers_id ) left join specials on ( specials.products_id = products.products_id AND ( ( (specials.expires_date > CURRENT_DATE) OR (specials.expires_date = 0) ) AND ( specials.status = 1 ) ) ) WHERE products.products_id=products_description.products_id AND products.products_id=products_to_categories.products_id AND products_to_categories.categories_id=categories.categories_id AND categories.categories_id=categories_description.categories_id ORDER BY products.products_id ASC

 

Any help would be great.

 

I am using php 5 and mysql 5.

 

Thanks,

Philip

Link to comment
Share on other sites

i just installed 1.4 and have problems with the admin/authors.php and admin/articles_review.php

 

i get this error

 

articles_review

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-10, 10' at line 1

select reviews_id, articles_id, date_added, last_modified, reviews_rating, approved from article_reviews order by date_added DESC limit -10, 10

[TEP STOP]

 

authors

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-10, 10' at line 1

select authors_id, authors_name, date_added, last_modified from authors order by authors_name limit -10, 10

[TEP STOP]

 

 

 

Also my articles weren't showing up because I wasn't able to put an author, and i had to use some code from the first page or two of this support thread. just thought i'd let you guys know that there are some errors.

Link to comment
Share on other sites

I had the same problem, changing the query to:

select a.articles_id from (articles a, articles_to_topics a2t) left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '1' and td.language_id = '1' and a.articles_date_added > SUBDATE(now( ), INTERVAL '30' DAY)

Seems to help. Don't know why though...

 

having the same problem as above, but not sure where these statements can be found? are these changes to be made within a php file, or does something have to be changed in SQL through phpMyAdmin?

 

thanks!

Link to comment
Share on other sites

i just installed 1.4 and have problems with the admin/authors.php and admin/articles_review.php

 

i get this error

 

articles_review

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-10, 10' at line 1

select reviews_id, articles_id, date_added, last_modified, reviews_rating, approved from article_reviews order by date_added DESC limit -10, 10

[TEP STOP]

 

authors

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-10, 10' at line 1

select authors_id, authors_name, date_added, last_modified from authors order by authors_name limit -10, 10

[TEP STOP]

Also my articles weren't showing up because I wasn't able to put an author, and i had to use some code from the first page or two of this support thread. just thought i'd let you guys know that there are some errors.

 

for this error fix at the end of this page:

http://www.oscommerce.com/community/bugs,1605

Link to comment
Share on other sites

store catalog located at root and admin were working fine then I installed the lastest version 1.4, full package 12 Jul 2006, now catalog/admin errors out , can not enter admin with the following error:

Warning: main(includes/functions/articles.php): failed to open stream: No such file or directory in /home/cpanelid/public_html/admin/includes/application_top.php on line 211

Warning: main(includes/functions/articles.php): failed to open stream: No such file or directory in /home/cpanelid/public_html/admin/includes/application_top.php on line 211

Warning: main(includes/functions/articles.php): failed to open stream: No such file or directory in /home/cpanelid/public_html/admin/includes/application_top.php on line 211

Fatal error: main(): Failed opening required 'includes/functions/articles.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cpanelid/public_html/admin/includes/application_top.php on line 211

I can see that catalog/includes/functions/articles.php does exist. Any ideas for a fix, please ?

Link to comment
Share on other sites

Did you try to add the file needed ?

I just check the archive and i saw a right file in catalog/admin/includes/functions/ called articles.php

 

try a new transfert ... ;)

Link to comment
Share on other sites

Did you try to add the file needed ?

I just check the archive and i saw a right file in catalog/admin/includes/functions/ called articles.php

 

try a new transfert ... ;)

GniDhal,

 

Double thanks for the quick reply and for pointing me into the right direction. It turns out that my local store directory had all of the catlog/admin/includes/files in the install but I overlooked ftp 'ing those files to the webserver. It is up and running now. I was misled by the error stating Failed opening required 'includes/functions/articles.php' , why did it not state 'admin/includes/functions/articles.php' ?

 

One more question, I have TinyMce enabled for product description and newsletter areas, should I extend it to include articles or should I follow install instructions that if you DO NOT have WYSIWYG HTMLArea MS2 v1.7 installed: Add the htmlarea folder (and all files inside) to: admin/htmlarea/... any reason why to use one versus the other ?

Link to comment
Share on other sites

Sorry

I don't use or try HTMLarea or TinyMce

I 'm using FCKeditor because it's working with IE AND Firefox and it's totally free.

 

I can't help you about theses WYSIWYG Tools...

Link to comment
Share on other sites

Sorry

I don't use or try HTMLarea or TinyMce

I 'm using FCKeditor because it's working with IE AND Firefox and it's totally free.

 

I can't help you about theses WYSIWYG Tools...

I enabled TinyMce and it works fine with Article Manager in either IE or FF in case anyone is interested. I will compare it with FCKeditor and report to this forum.
Link to comment
Share on other sites

  • 2 weeks later...

:blink: Article versus Product / How to buy an Article? :blink:

 

Good evening

 

I am worried about this contribution... and have some questions to

understand it:

 

I just installed the Article Manager and now I have Products AND Articles;

If I create Articles, then it`s not possible to define e.g. a Price and in the

Shop it`s not possible to buy an Article as I can buy Products.

 

Shouldn't it be possible to define Article Prices and buy Articles?

 

I can Assign Products to Articles, but I can not assign Articles to

Articles. That's OK, too, I assume?

 

What's the Idea to have Articles and Products? / Where's the difference?

 

Maybe there's someone who can bring in some light...

 

Thanks a lot in advance,

kind regards,

Thomas

Link to comment
Share on other sites

:blink: Article versus Product / How to buy an Article? :blink:

 

Good evening

 

I am worried about this contribution... and have some questions to

understand it:

 

I just installed the Article Manager and now I have Products AND Articles;

If I create Articles, then it`s not possible to define e.g. a Price and in the

Shop it`s not possible to buy an Article as I can buy Products.

 

Shouldn't it be possible to define Article Prices and buy Articles?

 

I can Assign Products to Articles, but I can not assign Articles to

Articles. That's OK, too, I assume?

 

What's the Idea to have Articles and Products? / Where's the difference?

 

Maybe there's someone who can bring in some light...

 

Thanks a lot in advance,

kind regards,

Thomas

 

 

i beieve your incorrectly assuming that the article manager manages articles of clothing or something similar. in actuality, it just allows you to post articles (write-ups) on your site. It gives you features similar to a blog where you can post little snippets of relevant text and such. if you're still confused, feel free to pm me

Link to comment
Share on other sites

:blink: Article versus Product / How to buy an Article? :blink:

 

Good evening

 

I am worried about this contribution... and have some questions to

understand it:

 

I just installed the Article Manager and now I have Products AND Articles;

If I create Articles, then it`s not possible to define e.g. a Price and in the

Shop it`s not possible to buy an Article as I can buy Products.

 

Shouldn't it be possible to define Article Prices and buy Articles?

 

I can Assign Products to Articles, but I can not assign Articles to

Articles. That's OK, too, I assume?

 

What's the Idea to have Articles and Products? / Where's the difference?

 

Maybe there's someone who can bring in some light...

 

Thanks a lot in advance,

kind regards,

Thomas

 

 

i beieve you're incorrectly assuming that the article manager manages articles of clothing or something similar. in actuality, it just allows you to post articles (write-ups) on your site. It gives you features similar to a blog where you can post little snippets of relevant text and such. if you're still confused, feel free to pm me

Link to comment
Share on other sites

This is in articles_new.php:

$articles_new_query_raw = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a.articles_date_added > SUBDATE(now( ), INTERVAL '" . NEW_ARTICLES_DAYS_DISPLAY . "' DAY) order by a.articles_date_added desc, ad.articles_name";

 

I get: 1054 - Unknown column 'a.authors_id' in 'on clause'

 

Can you tell me what I need to change?

 

Thanks,

Philip

Link to comment
Share on other sites

Hi all!

For some reason the subtopics will not get listed on my site...

The articles are there, like:

http://www.example.com/article-subtopic-a-13.html

But they don't get listed in:

http://www.example.com/topic-t-3_6.html

That gives me a "404"...

Is a page missing?

//Micke

 

The above problem is because you are using the articles hack for ultimate SEO urls but there is a function mission in the code.

Unfortunaltey I can not give you the function as I do not know what it is but if anyone can help out here I would appreciate it as Im having the same problem.

Link to comment
Share on other sites

Jamez!

There is a contribution here:Ultimate SEO URLs for articles

Is this the solution to our problem or is this the hack that started it?

I can't remember installing it...

//Micke

 

Its the potential solution but theres a function missing from it so it doesnt work.

tep_get_parent_topics is the function that is missing I believe.

Edited by Jamez
Link to comment
Share on other sites

that should be with the articles manager I think. Here is the function

 

////
// Recursively go through the topics and retrieve all parent topic IDs
// TABLES: topics
 function tep_get_parent_topics(&$topics, $topics_id) {
$parent_topics_query = tep_db_query("select parent_id from " . TABLE_TOPICS . " where topics_id = '" . (int)$topics_id . "'");
while ($parent_topics = tep_db_fetch_array($parent_topics_query)) {
  if ($parent_topics['parent_id'] == 0) return true;
  $topics[sizeof($topics)] = $parent_topics['parent_id'];
  if ($parent_topics['parent_id'] != $topics_id) {
	tep_get_parent_topics($topics, $parent_topics['parent_id']);
  }
}
 }

goes in the catalog\includes\functions\articles.php

Link to comment
Share on other sites

Hi All!

That function is already there. I overwrote it with the one you posted but there's no improvement...

 

The links to the article works fine , both in the "New articles" listing and in the "All articles" listing.

It's the listing of the subtopic that does'nt work...

//Micke

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