Jump to content
Sign in to follow this  
Farrukh

[Contribution] All Products v3.0 MS 2.2 with Images

Recommended Posts

The code for this contribuion is already included in all versions of Header Tags after the stated version so you should be able to skip those steps and have it work. Even if your version doesn't have it, it won't prevent it from working. It will just prevent Header Tags from working on thie All Products page.

 

Jack

Share this post


Link to post
Share on other sites

Hi

 

Hope someone can help me out here. What i am trying to do is remove a category from the all products page.

 

With my old page i had the following sql

$products_query = tep_db_query("SELECT p.products_id, pd.products_short, pd.products_name, pc.categories_id FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc where pc.categories_id <> '87' AND p.products_id = pd.products_id AND p.products_id = pc.products_id AND p.products_status = 1 AND pd.language_id = " . $languages_id . " " . $where . " order by pd.products_name");

 

As you can see i have

TABLE_PRODUCTS_TO_CATEGORIES . " pc where pc.categories_id <> '87'
in there which removes that category.

 

I am having some difficulty in adding that statement into the new query

$listing_sql = "select p.products_id, p.products_model, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id $where order by pd.products_name";

 

Can anybody point me in the right direction, i have been attempting to do it for hours now but no luck :(

 

Thanks

Share this post


Link to post
Share on other sites

Great contribution.

 

 

 

I have two columns (name & artist) that a user might search by first letter. Name used here as a title.

 

How can I modify this code to check the first letter of both columns?

 

$where="where pd.products_name like '$firstletter%' and p.products_status = '1'";

 

thank you.

Share this post


Link to post
Share on other sites

It might be your grouping. Your statement is saying

 

where pd.products_name

 

OR

 

pd.products_artist like '$firstletter%'

 

but you want it to say

 

where pd.products_name OR pd.products_artist

 

like '$firstletter%'

 

so surrount that first part as

 

where (pd.products_name OR pd.products_artist) like '$firstletter%'

 

I haven't tested this and it may need some changes but the idea is correct.

 

Jack

Share this post


Link to post
Share on other sites

HI Jack!

 

Thank you for responding. This is very generous of you to give your time and knowledge. I really appreciate your help.

 

 

I've tried this

 

where (pd.products_name OR pd.products_artist) like '$firstletter%'

 

and while it doesn't kick out an error, it also doesn't show either the name or the artist. (Shows nothing, not even the "no products" message.)

I've searched the web for ideas, but am still stumped. Can mySQL do an OR statement with LIKE?

Share this post


Link to post
Share on other sites

Aha!

 

I think I have it working now!

 

where ((pd.products_name like '$firstletter%') OR (pd.products_artist like '$firstletter%')) and p.products_status = '1'";

Share this post


Link to post
Share on other sites

Hi! I am trying to install AllProducts contribution but I got stuck at the first step. I ran the sql file and I received the following error:

Error
SQL query: 

INSERT INTO configuration( configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function ) 
VALUES (

'219', 'All Products Image Width', 'ALLPROD_IMAGE_WIDTH', '100', 'The pixel width of heading images', '4', '5', '2003-07-31 19:35:01', '2003-07-24 17:45:15', NULL , NULL 
);



MySQL said:  

#1062 - Duplicate entry '219' for key 1

 

What should I do now? :( I really need this contribution. :(

Thank you for your time and support!

 

Simone

 

P.S. I ran the script twice... I received the error both times... Thanks.

Share this post


Link to post
Share on other sites

It means that you are trying to overwrite an existing entry. In the sql file, edit it and change the entries for 219 to 800. That numbe is just a guess but should be OK. If 800 also exists in your database, you will still get the error. To be sure what number to use, you would have to look at the configuration table and see what the last number used is.

 

Jack

Share this post


Link to post
Share on other sites

How many products should I display in one page? I mean is there a problem with google if put too many products and google thinks its a linkfarma?

 

I have now 54 products per page and total products 102 (so only two pages and I like it). Some products are twice or even three times becouse they are in different categories only with minor changies in product description. Does this couse any problems (with google)?

Edited by aapinen

Share this post


Link to post
Share on other sites

There isn't a set number but most SEO people suggest around 50 and that more than 100 are too many. I think you are safe at 54 though. It is also difficult to say about the duplicate products. The SE's may seen that as duplicate content if there is not enough of a difference betwen the pages.

 

Jack

Share this post


Link to post
Share on other sites

Does anyone else have this problem or is it just me? When I open allprods.php I see all my prods as I should. If I click the prod description, I go to the prod page, as it should do. But when I click the manufacturer link, I get the no products found page. The problem is with the link but I cant see where the problem is. Here is a sample of my link when I click the manufacturer:

 

IT IS

www.mysite.com/index.php?manufacturers_id=

 

SHOULD BE

 

www.mysite.com/index.php?manufacturers_id=10


"There is no doubt about precisely when folks began racing each other in automobiles. It was the day they built the second automobile." - Richard Petty

Share this post


Link to post
Share on other sites
Since the index file handles more than just the home page display, to have it display all products, you would need to find the section on the page that starts with } else { and insert
tep_redirect(tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL'));

I haven't tried this but I think it should work.

 

Jack

 

 

that didn't seem to work for me, i followed the instructions to the letter except for the last part

 

8) You need to have at least one link to the all products page. The more you have,

the better your chances of having the search engines find the page.

 

//infomation.php (OPTIONAL)

FIND:

 

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

 

ADD this BEFORE it

 

'<a href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . BOX_INFORMATION_ALLPRODS . '</a><br>' .

 

 

//categories.php infobox (RECOMMENDED)

FIND:

 

new infoBox($info_box_contents);

 

ADD this BEFORE it:

 

$info_box_contents[] = array('align' => 'center',

'text' => '<font size=-2><a href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . BOX_INFORMATION_ALLPRODS . '</a></font>');

 

 

//specials.php infobox (RECOMMENDED)

FIND:

 

new infoBox($info_box_contents);

 

ADD this BEFORE it:

 

$info_box_contents[] = array('align' => 'center',

'text' => '<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '">' . "View all Discount Products" . '</a>');

 

//whats_new.php infobox (RECOMMENDED)

FIND:

 

new infoBox($info_box_contents);

 

ADD this BEFORE it:

 

$info_box_contents[] = array('align' => 'center',

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . "View Latest Additions" .'</a>');

 

i searched all those files and couldn't find a single reference to infobox anywhere.

Share this post


Link to post
Share on other sites

Any thoughts? Mainly wanted to see if anyone had the same problem as me. Just wanted to rule out if I broke it during my install. Fell free to post a fix if you ahve one. Thanks for the support.


"There is no doubt about precisely when folks began racing each other in automobiles. It was the day they built the second automobile." - Richard Petty

Share this post


Link to post
Share on other sites
that didn't seem to work for me, i followed the instructions to the letter except for the last part

i searched all those files and couldn't find a single reference to infobox anywhere.

Then you've got some type of modified shop. The contribution will work with it but I won't be able to help you since you have non-standard code. The idea with that set of instructions though is that you need a link on the home page to the All Products page, otherwise it is useless. So it doesn't have to be where the instructions say. You can put a link anywhere it will fit in on your home page.

 

Jack

Share this post


Link to post
Share on other sites

I just installed this, and tried to run the sql file. I got the following message:

 

Error

SQL query:

 

INSERT INTO configuration( configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function )

VALUES (

 

'219', 'All Products Image Width', 'ALLPROD_IMAGE_WIDTH', '100', 'The pixel width of heading images', '4', '5', '2003-07-31 19:35:01', '2003-07-24 17:45:15', NULL , NULL

)

MySQL said:

 

#1062 - Duplicate entry '219' for key 1

 

 

When I go to my catalog, I have the link to all of my products and everything seems to be working fine. I do not have any link under configuration in my admin to set the all prods to true however... how can I fix this?

Share this post


Link to post
Share on other sites
I just installed this, and tried to run the sql file. I got the following message:

 

Error

SQL query:

 

INSERT INTO configuration( configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function )

VALUES (

 

'219', 'All Products Image Width', 'ALLPROD_IMAGE_WIDTH', '100', 'The pixel width of heading images', '4', '5', '2003-07-31 19:35:01', '2003-07-24 17:45:15', NULL , NULL

)

MySQL said:

 

#1062 - Duplicate entry '219' for key 1

 

 

When I go to my catalog, I have the link to all of my products and everything seems to be working fine. I do not have any link under configuration in my admin to set the all prods to true however... how can I fix this?

 

\\\Correction- When I go to view all products, only the first page works. When I click on any other letter, no products show.

Edited by squigglybee

Share this post


Link to post
Share on other sites
\\\Correction- When I go to view all products, only the first page works. When I click on any other letter, no products show.

 

I just found a previous post from someone who was having the same problem. I changed the 219 to 800. Then I got an error about 220 also. I tried changing that too.

 

Now...when I click View all products, it just takes me to my index page. What did I do?!

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
yep.

 

I finally got it to work. I'm not sure what was the problem. Now I have an option to change the name of my all products filename in my admin/configuration. it wasn't there earlier. 0___0 Oh well. It works so that's all that matters!

Share this post


Link to post
Share on other sites

Got an issue,

 

I can see the "View all Products" link, but after clicking it I get a blank page?

 

Can anyone please assist

Here is the link to the shop,

www.donnadonella.com/4u

 

Thanks,


Espen Falkenhaug

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  

×