Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Farrukh

Recommended Posts

  • Replies 387
  • Created
  • Last Reply

Top Posters In This Topic

Great contribution! I've modified it a bit for my own purposes, of course, and (this is the main reason I'm posting here), I also ran into the problem with the manufacturers_id number not being generated in the URL, with clicks leading to a no-such-product page. Jack posted a fix, but he transposed his code snippets, exchanging the replacement code with the to-be-replaced code.

 

You need to use the following code:

 

$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, m.manufacturers_id 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";

 

instead of the $listing_sql query (ca. line 298 - my mods may have shifted it a bit) in catalog/allprods.php. You may then want to fiddle with some formatting/layout details.

 

In developing my own store - where I will be selling movie memorabilia like posters - I early on replaced "manufacturers" with "genres," as well as "products" with "items" or "titles."

 

Which brings me to a MINOR request. Can someone point me to the proper code for adding a numerical definition for "fl" (first letter)? Some titles - 2001, 10, 1941, 48 HOURS, etc. - begin with numbers, to state the obvious. These will appear at the top of the list as currently generated anyway, which is why this is such a minor point. Still, it would make for more complete code if the user, when clicking on a # link, restricted the results exclusively to items that begin with a #. Hacking away in blithe ignorance, I tried variations on fl=0 or fl=1, etc., but I'm just poking around in the dark here.

 

Thanks again for this great contribution - which can work as a very nice catalog option for users well beyond whatever use it does for SEs.

Link to comment
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,

 

I have it located here, which is root for the shop.

 

/httpdocs/4u/allprods.php

 

Is that the good place?

Link to comment
Share on other sites

hmmm strange. It's there but still this issue...

I wonder if it's an FTP error, since the only way I can get a blank page without an error message is to upload a completely empty file. Have you checked to be sure that the file's contents are really there? Firewall conflicts and other problems can sometimes make it look like you've uploaded a file when they've actually stripped the contents away. My ISP distributed a free anti-virus/firewall package that conflicted with Filezilla in approximately that way.

Link to comment
Share on other sites

You could also try renaming a file, like privacy.php, to allprods.php and see if it loads. That will isolate the problem a little.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

Hi Everyone,

 

I've installed this contribution and it works fine, although strangely enough I don't think it should work.

 

Let me explain.............

 

On my store I can see and click the "view all products" link fine, but if I go into the admin side I can see Configuration | All Products but there's nothing there only 3 headings - Title, Value & Action. I can't click anywhere.

 

Have I missed something during the install?

 

Many thanks

 

Trev

Link to comment
Share on other sites

The changes to the database are probably referencing a used configuration group ID. You will need to find the entries in the database and be sure they are pointing to the correct items.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack,

I really liked the A-Z idea..I got the installation working...but kinda stuck in 2 places.

1. I want to display products with a specific category...I know I could use a c.category_id= '1'...but how do I add it in query and make sure it searches the right product after comparing in products_to_category table.

 

2. You mighthave got it a lot....want to add 0-9 number range combining all products starting with numbers into 1 firstletter query i.e. treating all numbers like any regular ONE alphabet...smthng like fl=$range

 

I thought I had succeeded with both...but my efforts have failed...would like your guidance:)

 

1 good thing I can take from the whole thing was....I was able to make a-z just the top part with alphabets as a column and call it as per the category being browsed....somehow its using only 1 category products....surely could use some help:)

Simple Add-ons Please add simple plain tips here for others.
Link to comment
Share on other sites

For the first problem, you will need to edit the sql statement to look at the categories table, which it doesn't right now.

 

Adding number searches is in the next version (not uploaded yet). To add it, just find this line

'<a href="' . tep_href_link("allprods.php",  'fl=Z', 'NONSSL') . '"> Z</A>  '   .

and change to

		'<a href="' . tep_href_link("allprods.php",  'fl=Z', 'NONSSL') . '"> Z</A><br>'   .
	'<a href="' . tep_href_link("allprods.php",  'fl=1', 'NONSSL') . '"> 1 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=2', 'NONSSL') . '"> 2 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=3', 'NONSSL') . '"> 3 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=4', 'NONSSL') . '"> 4 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=5', 'NONSSL') . '"> 5 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=6', 'NONSSL') . '"> 6 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=7', 'NONSSL') . '"> 7 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=8', 'NONSSL') . '"> 8 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=9', 'NONSSL') . '"> 9 |</A>' .

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

thanks Jack,

I figured out the categories part.

for the second problem, I know how to add numbers 1 by 1...but what I am trying to do is put all numerical searches into 1 call fl=0-9 or fl=#

I have seen it on a lot of sites, even tried breaking it but failed....I know it has to do with making a range

but cant figure it out

 

For the first problem, you will need to edit the sql statement to look at the categories table, which it doesn't right now.

 

Adding number searches is in the next version (not uploaded yet). To add it, just find this line

'<a href="' . tep_href_link("allprods.php",  'fl=Z', 'NONSSL') . '"> Z</A>  '   .

and change to

		'<a href="' . tep_href_link("allprods.php",  'fl=Z', 'NONSSL') . '"> Z</A><br>'   .
	'<a href="' . tep_href_link("allprods.php",  'fl=1', 'NONSSL') . '"> 1 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=2', 'NONSSL') . '"> 2 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=3', 'NONSSL') . '"> 3 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=4', 'NONSSL') . '"> 4 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=5', 'NONSSL') . '"> 5 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=6', 'NONSSL') . '"> 6 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=7', 'NONSSL') . '"> 7 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=8', 'NONSSL') . '"> 8 |</A>' .
	'<a href="' . tep_href_link("allprods.php",  'fl=9', 'NONSSL') . '"> 9 |</A>' .

 

Jack

Simple Add-ons Please add simple plain tips here for others.
Link to comment
Share on other sites

  • 2 weeks later...
thanks Jack,

I figured out the categories part.

....

 

Hello,

 

can you please post the code. I can?t solve the same problem. btw is there anyone with a working listing-sql for the enable/disable Categories contrib?

 

thank?s

Marco

Link to comment
Share on other sites

Is anyone aware a compatibility issue with the STS V4.2 contribution. I ran through the install of Allproducts V4.4b. I had previously installed STS 4.2 and I use it. Now, as long as STS is activated, I get a blank page when I enter my store. If I turn off STS, Allproducts seems to work. So far I can't find which file is causing the problem and what kind of mods I need to make for Allproducts to get setup right.

 

Has anyone else seen this?

 

Keith

Link to comment
Share on other sites

I've installed it into STS shops without any problems. My guess is that there must be a mistake in your installation of one of the contributions.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hello,

 

can you please post the code. I can?t solve the same problem. btw is there anyone with a working listing-sql for the enable/disable Categories contrib?

 

thank?s

Marco

 

thats the query I used...just a note...I made allprods for each of my categories...you can change the

 

c.categories_id='2'
to any category you want in the code underneath

 

$listing_sql = "select p.products_id, p.products_model ,pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.manufacturers_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products p , categories c, products_to_categories p2c left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = '1' left join specials s on p.products_id = s.products_id where pd.products_name like '$firstletter%' and c.categories_id='2' and p.products_id = p2c.products_id and c.categories_id = p2c.categories_id and products_status = '1' order by pd.products_name";
Simple Add-ons Please add simple plain tips here for others.
Link to comment
Share on other sites

Great Contrib, easy to install, took about 30mins, then another 20mins to adjust things with the sql query as the numbers where different in my configuration table and I just ran it without looking closely enough to begin with.

 

Working now and was very easy and does what it says on the tin.

 

One thing that would be really cool but maybe a lot of work to do is all the letters A-Z, grey out the letter and dont have it as an active hyperlink if there are no products beginning with the letter A for example.

 

Not sure of what would be a quick and efficient way of doing that without running a complecated query everytime the page loads.

 

Great work guys,

Ally

Link to comment
Share on other sites

I have this contribution working good but I'm also using the Hide Price if $0 contribution to list some items for informational purposes only. I'm tyring to figure out how to edit the allprods code to hide the Price and Buy Now button for items with $0 price. I've looked at the code for hiding these items on the New Products page (included with the Hide Price contribution) but the overall structure is quite a bit different than the allprods page.

 

Any tips or or suggestions on how I would implement this change for allprods?

Link to comment
Share on other sites

I've installed it into STS shops without any problems. My guess is that there must be a mistake in your installation of one of the contributions.

 

Jack

 

I got it basically working. The problems I was having seems to be assocated with the header tags add-on for STS. Letting the STS module control the header tags as been unstable for me so for. I might implement the full header tags code on each page instead of letting the STS module hande it.

Link to comment
Share on other sites

I have this contribution working good but I'm also using the Hide Price if $0 contribution to list some items for informational purposes only. I'm tyring to figure out how to edit the allprods code to hide the Price and Buy Now button for items with $0 price. I've looked at the code for hiding these items on the New Products page (included with the Hide Price contribution) but the overall structure is quite a bit different than the allprods page.

 

Any tips or or suggestions on how I would implement this change for allprods?

You need to edit the sql call to ignore prices if that hide price is set. I don't use the hide price contribution so I can't tell you the code but it should be a minor change.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I read a lot in this forum that, this contribution is very good for SEO, but I don't see any difference between this and products_new.php (comes with osc). They both have images, price, buy now button, etc. Can somebody tell me the difference between the 2 and do I still need to install this contribution even though I have a link to products_new.php from all my pages currently. Can somebody help me to decide (for Seo purposes only).

 

Thanks

Link to comment
Share on other sites

You need to edit the sql call to ignore prices if that hide price is set. I don't use the hide price contribution so I can't tell you the code but it should be a minor change.

 

Jack

 

I think got it! I'm a php hack but it seems to do the job. I made these changes in /includes/modules/allprods.php

 

To hide the price I found:

$str['price'] = $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '<br>';

 

and replaced with

$str['price'] = (($listing['products_price'] > 0) ? $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) : '') . '<br>';

 

To hide the Buy Now button I found:

$str['buynow'] = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '<br>';

 

and replaced with:

$str['buynow'] = (($listing['products_price'] > 0) ? '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '<br>': '?');

Link to comment
Share on other sites

I read a lot in this forum that, this contribution is very good for SEO, but I don't see any difference between this and products_new.php (comes with osc). They both have images, price, buy now button, etc. Can somebody tell me the difference between the 2 and do I still need to install this contribution even though I have a link to products_new.php from all my pages currently. Can somebody help me to decide (for Seo purposes only).

 

Thanks

Let's say you have a 1,000 products but only one of them is new. When the search engines visit your site and follow the products_new link, they will find a link to one product. If they follow the All Products link, they will find links to 1,000 products. Can you see the difference? So, yes, you should have this installed. It probably won't make a big differnece by itself but SEO involces a lot of small changes and this is one of them.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

9.) Go into your admin. Under Configuration> All Products, set

"All Products: ON/OFF" to True to see your allprods.php page.

 

 

hello, I do not understand well this step, nonencounter where this all products: on/off

 

 

thaks

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