Jump to content
Sign in to follow this  
Farrukh

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

Recommended Posts

Hi, I see this is an old thread but hopefully someone will still reply?

 

I have 2 problems:

 

1-I also see Your_Store_Name=''some product name''

 

2- All prods just turns itself OFF (false) in admin without any reason.

 

Any answer to one of these will be greatly appreciated!

 

Best regards,

Yandus

 

OK, first question was an easy one. Just change this in allprods.php

 

second question I hear on threads that Allprods isn't stable and there is no solution to this. I have noticed that this only occurs when I change a serious setting in Admin or flush something out (cache for ex.)

If you are having this problem. I think that allprods won't turn to false so long you don't do anything 'bad' in the admin. Please let me know if you have another verified theorie about this.

Greetz

Share this post


Link to post
Share on other sites

At my allprods.php page, the product images cannot be displayed! However, at Admin>Configuration>Images>All Products Width/Height, if I leave it blank, then I can see the product images in their original size. If I try to put a value for width and height (because I want to display them as a smaller version), then I couldn't see any images!

 

Anyone has this problem? I'm not sure whether is it because of the other contribtions which I have installed prior to this (for example, OnTheFly_GDThumbs_1_5 which reduce the size of my thumbails images in other pages).

 

This All Products Contribution seems a good idea for SEO, but it doesn't seem to be popular in osC forum. Seldom mentioned and mostly negative feedback. I also noticed that it automatically disabled itself whenever I make some changes to other thing in Admin. :(

Share this post


Link to post
Share on other sites

I just uploaded a new version. Here are the changes I made:

 

* Fixed the problem with All products being turned off with other admin changes

* Fixed code error where image was being displayed. The arguments for the

tep_image call were out of order and too numerous.

* Replaced non-existant All Products class in allprods.php with class main.

* Removed unnecessay files and instructions

* Added define to make it work without Header Tags (not recommended for best SEO results)

* Combined the sql files

 

Jack

Share this post


Link to post
Share on other sites

Okay, I decided to give it another go, started installing v4.0...

 

When I execute the SQL script, everything executes fine except the following:

UPDATE configuration SET sort_order = '7' WHERE configuration_title = 'Medium Image Width';# MySQL returned an empty result set (i.e. zero rows).

UPDATE configuration SET sort_order = '8' WHERE configuration_title = 'Medium Image Height';# MySQL returned an empty result set (i.e. zero rows).

UPDATE configuration SET sort_order = '9' WHERE configuration_title = 'Large Image Width';# MySQL returned an empty result set (i.e. zero rows).

UPDATE configuration SET sort_order = '10' WHERE configuration_title = 'Large Image Height';# MySQL returned an empty result set (i.e. zero rows).

Is this okay? I guess it's provided for some other contribution, right? The only other contrib that I've got installed is the Header Tags Controller...

Share this post


Link to post
Share on other sites

I could reproduce the error that I was getting earlier this week:

 

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 'and c.parent_id = '24' and c.categories_id = cd.categories_id an

 

select c.categories_id, cd.categories_name, c.parent_id from categories c, categories_description cd where and c.parent_id = '24' and c.categories_id = cd.categories_id and cd.language_id='4' order by sort_order, cd.categories_name

 

And the good thing is, I found a solution in another thread.

In short: there's an error on line 126 of the /catalog/includes/boxes/categories.php file

Solution: replace "where and" on that line with "where"

 

I've learned now that I should read the error messages more carefully, even when they look like one you've seen before. I guess Mondays are not always the best days to think straight :-"

 

Thanks to all who made this contrib to what it is now! :thumbsup:

Share this post


Link to post
Share on other sites

Hi, I have this error

Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 1826961 bytes) in /home2/www/zumorecords/v3/includes/sts_display_output.php on line 282

 

:-(

10x

Share this post


Link to post
Share on other sites

You have exceeded the memory limit of your host. How many products do you have?

 

Jack

Share this post


Link to post
Share on other sites

I've uploaded a new version. Here are the changes:

 

* Added A to Z display

* Added optional display mode controlled by admin setting

* Changed code to have all products code use the existing product listing code for a more uniform appearance. This allows for easier control of what colums are displayed and also adds a page split option.

* Removed the extra allprods_model.php file. That is now controlled by the shops settings due to above change.

* Image height was not being displayed correctly

* Added specials date bug fix by Michael Hopfengaerter

 

Jack

Share this post


Link to post
Share on other sites
I've uploaded a new version. Here are the changes:

 

* Added A to Z display

* Added optional display mode controlled by admin setting

* Changed code to have all products code use the existing product listing code for a more uniform appearance. This allows for easier control of what colums are displayed and also adds a page split option.

* Removed the extra allprods_model.php file. That is now controlled by the shops settings due to above change.

* Image height was not being displayed correctly

* Added specials date bug fix by Michael Hopfengaerter

 

Jack

 

Is anybody else having problems in the display with this contribution?

 

In the admin, when display mode = false, my products original price are listed but with slash and a special price of $0 is listed as well. Then I change display mode = true, the products are listed normally and the admin settings in product listing (buy now, etc) are fine as well. Any help?


Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Share this post


Link to post
Share on other sites

I don't think that is an All Products problem. When it is disabled in admin, it is not active. Clicking on the All Products links in the shop just redirects to the home page. So if you have a problem with the display when it is disabled, it was probably there before.

 

Jack

Share this post


Link to post
Share on other sites
I've uploaded a new version. Here are the changes:

 

* Added A to Z display

* Added optional display mode controlled by admin setting

* Changed code to have all products code use the existing product listing code for a more uniform appearance. This allows for easier control of what colums are displayed and also adds a page split option.

* Removed the extra allprods_model.php file. That is now controlled by the shops settings due to above change.

* Image height was not being displayed correctly

* Added specials date bug fix by Michael Hopfengaerter

 

Jack

 

I'm referring to this feature being true or false. It asks whether to display in standard table format or not. If I choose false then the aforementioned effect ensues.

Edited by sarafina

Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Share this post


Link to post
Share on other sites

Oh, I see what you mean. Yes, that is a problem with the code. Try this. In allprods.php find this line

$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 AND TO_DAYS(s.expires_date)>=TO_DAYS(NOW()) $where order by pd.products_name";

and replace it with

$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";

Then in includes/modules/allprods.php, find

	  echo '			<td align="center" width="33%" class="smallText"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br><s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($listing['listing_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></td>' . "\n";

and replace with

	  if ($listing['specials_new_products_price'] > 0.0)
	echo '			<td align="center" width="33%" class="smallText"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br><s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></td>' . "\n";
  else
	echo '			<td align="center" width="33%" class="smallText"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>' . "\n";

Please let me know if it works so I can upload a revision.

 

Jack

Share this post


Link to post
Share on other sites

Thank you for the codes, it definitely fixed it. There are still so things to consider:

 

1.The options in Configuration>Product Listing don't apply to the store when the display mode = false. So you can't change the order of or remove attributes like name, price, image etc.

 

2.The products that are indeed on special sale don't show it when the display mode = false. (Only in the product listing* anyway. In the 'new products' and 'special' boxes, the new prices is assigned).

 

I don't know if you wanted the contribution to achieve those effects or not but I thought you should know. Thanks again for the fix.

 

*I'm referring to the all products page products being listed and NOT the individual product listing.

Edited by sarafina

Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Share this post


Link to post
Share on other sites

Also, is there any way you can change the amount of products being displayed in a row? (currently set to 3 products a row). Thanks


Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Share this post


Link to post
Share on other sites

Hi i have just installed All Products v4.2 MS 2.2 with Images

 

But i have som Langue Problem in the rows it just say >

 

TABLE_HEADING_IMAGE - TABLE_HEADING_PRODUCTS - TABLE_HEADING_PRICE - TABLE_HEADING_BUY_NOW

 

Any here ho know where i can change that??

Share this post


Link to post
Share on other sites
Hi i have just installed All Products v4.2 MS 2.2 with Images

 

But i have som Langue Problem in the rows it just say >

 

TABLE_HEADING_IMAGE - TABLE_HEADING_PRODUCTS - TABLE_HEADING_PRICE - TABLE_HEADING_BUY_NOW

 

Any here ho know where i can change that??

 

Go to INCLUDES>LANGUAGES>ENGLISH.PHP

 

add...

// Table heading titles
define('TABLE_HEADING_IMAGE', 'Image');
define('TABLE_HEADING_PRODUCTS', 'Name');
define('TABLE_HEADING_PRICE', 'Price');
define('TABLE_HEADING_BUY_NOW', 'Buy Now');

 

You can change anything in the ' ' to include the unique titles you want. ie. 'Shoes' instead of 'Image' if you're showing a picture of your products.

Edited by sarafina

Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Share this post


Link to post
Share on other sites
Also, is there any way you can change the amount of products being displayed in a row? (currently set to 3 products a row). Thanks
I will work on the display problem. As for the number per row, that is a setting - admin->configuraiton->Maximum Values->Categories to list per row.

 

Jack

Share this post


Link to post
Share on other sites

Oops, I didn't even think about looking at max values. It worked. Thanks, looking forward to seeing the display update.


Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Share this post


Link to post
Share on other sites

does anybody know here how to change alphabetical order of listing in the category page so that the newest added products will be on the top? thanks a lot..


Sometimes, ignorance is not bliss.

Share this post


Link to post
Share on other sites

I'm not sure what you mean by the category page since this is the thread for All Products. Assuming you meant that page, find this in all_prods.php

order by pd.products_name

and change it to

order by p.products_date_added DESC

 

Jack

Share this post


Link to post
Share on other sites

o, i am sorry, i am not in the right place here... code should be in product_listing.php... i don't know php, but i have intuition it should be there... maybe i am wrong though..


Sometimes, ignorance is not bliss.

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  

×