Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Thumbnail Category Browse


Guest

Recommended Posts

  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

Thanks, Chris. I'm hopeful. I guess once I work out the SQL problem, I'll address the STS problem.

 

JB

The most recent release adds another option for those that are having SQL errors with the UNION (MySQL < 4.0). The alternate file is called thumb_row_join.php and uses standard osC-MS2.2 code.

 

Install the latest and then tell me how it works for you...

 

Bobby

Link to comment
Share on other sites

  • 3 weeks later...

Hi Bobby

 

Have tried to install your contrib but have had no luck so far.

 

I started off with the union query file first but got the old "Fatal error: Cannot redeclare unionSplit::$page_number" msg. :( So i thought, ok its PHP 5, I will install the other one and see what happens. :D This time i get nothing, no error & no display :(

 

I tried your $current_category_id variable tweak but no luck, moved the position of the "<?php include(DIR_WS_MODULES . 'thumb_bar_join.php'); ?>" further up the product_info file thinking maybe it was just a display thing but no luck again.

 

My server settings are:- Apache version 1.3.33 (Unix)

MySQL version 4.0.22-standard

PHP version 5.0.3

 

Cant think of anything else it could be :'( PHP 5 maybe ?

 

Cheers

 

Mike

Link to comment
Share on other sites

  • 2 weeks later...

Hello there,

 

Chemo here is one for you, Great contribution but it doesnt seems to be compatible with your SEO one. I only noticed when i moved it to my live site, the URL it creates seems to be a combination of he a rewrite with patch appeneded at the end, which results in a 404

So for exemple one ite would link to :

clip-photo-m?mo-singe-p-83.html&cPath=64_67

when the correct url should be:

clip-photo-m?mo-singe-p-83.html

 

Any ideas ?

 

I am tempted to remove the code :

( isset($cPath) && tep_not_null($cPath) ? '&cPath='.$cPath : '' ) .

from the line :

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $tmp['products_id'] . ( isset($_GET['page']) && tep_not_null($_GET['page']) && is_numeric($_GET['page']) ? '&page=' . (int)$_GET['page'] : '') ) . ( isset($cPath) && tep_not_null($cPath) ? '&cPath='.$cPath : '' ) . '">' . tep_image(DIR_WS_IMAGES . $tmp['products_image'],  $tmp['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $tmp['products_id']) . '">' .

 

But would prefer to have your go ahead on this since you are the expert on both those contribution ;)

Edited by Phocea
Link to comment
Share on other sites

Hello there,

 

Chemo here is one for you, Great contribution but it doesnt seems to be compatible with your SEO one. I only noticed when i moved it to my live site, the URL it creates seems to be a combination of he a rewrite with patch appeneded at the end, which results in a 404

So for exemple one ite would link to  :

clip-photo-m?mo-singe-p-83.html&cPath=64_67

when the correct url should be:

clip-photo-m?mo-singe-p-83.html

 

Any ideas ?

 

I am tempted to remove the code :

( isset($cPath) && tep_not_null($cPath) ? '&cPath='.$cPath : '' ) .

from the line :

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $tmp['products_id'] . ( isset($_GET['page']) && tep_not_null($_GET['page']) && is_numeric($_GET['page']) ? '&page=' . (int)$_GET['page'] : '') ) . ( isset($cPath) && tep_not_null($cPath) ? '&cPath='.$cPath : '' ) . '">' . tep_image(DIR_WS_IMAGES . $tmp['products_image'],  $tmp['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $tmp['products_id']) . '">' .

 

But would prefer to have your go ahead on this since you are the expert on both those contribution ;)

 

 

Have you made any modifications? I have not seen this on any of the stores I have installed this on. - which would make me think it is something you did or something in your store... not the contribution....

 

Chris

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Hmm I tracked it dopwn and that particular piece of code was added in the contrib (http://www.oscommerce.com/community/contributions,2857/category,all/search,thumbnail) on the 6th March by Matt H .

I guess he must have left some of his custom codes in there and since it was the latest version available when I installed it ...

I will remove it then. Thanks

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

Thanks guys, I didn't catch the error. Glad you got it fixed. I just added a price and retail price mod, but I keep getting the following error:

 

arning: Missing argument 2 for display_price() in e:\inetpub\wwwroot\catalog\includes\classes\currencies.php on line 73

 

I the same mod the also purchased by and it did the smae thing. I'm using the Ez New Fields mod. Other boxes work fine. Here's the code:

 

 

 

 

# you may choose to get this from a JOIN ... modify the above code and comment this out

$tmp['products_name'] = tep_get_products_name($tmp['products_id']);

# assign the data

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

'params' => 'class="smallText" valign="center" width="'.$width.'%"',

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $tmp['products_id'] . ( isset($_GET['page']) && tep_not_null($_GET['page']) && is_numeric($_GET['page']) ? '&page=' . (int)$_GET['page'] : '') ) . '">' . tep_image(DIR_WS_IMAGES . $tmp['products_image'], $tmp['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $tmp['products_id']) . '">' . $tmp['products_name'] . TEXT_PRODUCTS_RETAIL_PRICE_INFO . '<s>' . $currencies->display_price($tmp['products_retail_price'] . $currencies->display_price( $tmp['products_tax_class_id'])) . '</s>' . TEXT_PRODUCTS_PRICE_INFO . '<span class="productSpecialPrice">' . $currencies->display_price ($tmp['products_price'] . $currencies->display_price ($tmp['products_tax_class_id'])) . '</span></a>');

}

 

 

 

if anyone can fix .this let me kniw,

 

Matt H

Link to comment
Share on other sites

  • 5 weeks later...

Really very nice contribution!!!

 

What if modify it a bit so, that the visitor could SCROLL ALL PRODUCTS in the given category on the product page?

 

Could somebody advice how to make this?

 

Thanks!

Link to comment
Share on other sites

Really very nice contribution!!!

 

What if modify it a bit so, that the visitor could SCROLL ALL PRODUCTS  in the given category on the product page?

 

Could somebody advice how to make this?

 

Thanks!

 

I believe that is what it does already.

Treasurer MFC

Link to comment
Share on other sites

I believe that is what it does already.

 

 

If I am right, current verion displays page links 1,2.3... if the number of products more then defined in thumb_bar.php. But could it be modified, so that instead of page links, HORIZONTAL SCROLL BAR will be shown above(or below) thumbs, enabling browsing all products in the category without need to go to other page?

Link to comment
Share on other sites

If I am right, current verion displays  page links 1,2.3... if the number of products more then defined in thumb_bar.php. But could it be modified, so that instead of page links, HORIZONTAL SCROLL BAR will be shown above(or below) thumbs, enabling browsing all products in the category without need to go to other page?

 

 

well, I am not that good with html but I would guess that requires the use of frames.

Treasurer MFC

Link to comment
Share on other sites

on IE there is something like an iFrame that could be used for this, but I don't know how well this is supported on other browsers and/or how it degrades if not supported

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

In ../thumb_bar_join.php

there is this piece of source which gives the net proudct price in the Quick Browser.

 

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $tmp['products_id'] . $_page) . '">' . $currencies->display_price($tmp['products_price'], tep_get_tax_rate($tmp['products_id'])) . '</a>');

 

In order to get the price incl. taxes I have modified it as follows:

 

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $tmp['products_id'] . $_page) . '">' . $currencies->display_price($tmp['products_price']*1.19, tep_get_tax_rate($tmp['products_id'])) . '</a>');
 }

Look for: *1.19

 

But there must be a better way to get the price incl. taxes, i.e. a piece of code depending on what is defined in admin => Tax Rates.

 

Anybody willing to help?

 

A language independent solution for the Quick Browser would also be very much appreciated.

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

...

But there must be  a better way to get the price incl. taxes, i.e. a piece of code depending on what is defined in admin => Tax Rates.

 

Anybody willing to help?

 

A language independent solution for the Quick Browser would also be very much appreciated.

I'm not following your questions...

 

The contribution already adds the tax with the same code used throughout the rest of the store (tep_add_tax). So, if it doesn't work on the thumb bar it doesn't work on the rest of your site.

 

The text is pulled from the database with tep_get_products_name() which is language independent.

 

Bobby

Link to comment
Share on other sites

I'm not following your questions...

 

The contribution already adds the tax with the same code used throughout the rest of the store (tep_add_tax).  So, if it doesn't work on the thumb bar it doesn't work on the rest of your site.

 

The text is pulled from the database with tep_get_products_name() which is language independent.

 

Bobby

 

Hi Bobby,

 

thanks for answering.

 

Maybe I was not clearly showing the difference?

This:

$currencies->display_price($tmp['products_price'], tep_get_tax_rate($tmp['products_id']))

is NOT showing prices including 19% tax in the thumb bar.

 

And yes all other prices show including 19% tax which is also showig on all other neccessary components.

 

This IS showing catalog prices in Quick Browser including 19% tax:

$currencies->display_price($tmp['products_price']*1.19, tep_get_tax_rate($tmp['products_id']))

 

The difference is:

*1.19

 

And yes the tax-calculation before or after install of QuickBrowser with regard to other pricing was and still is working 100% correct (incl. 19%).

 

And all other osC'ers in the Dutch osCommerce-forum were also experiencing the same problem so i was not the only one.

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

I realize the difference...and did not look close enough to recognize the obvious problem.

 

This:

$currencies->display_price($tmp['products_price'], tep_get_tax_rate($tmp['products_id']))

should be this:

$currencies->display_price($tmp['products_price'], tep_get_tax_rate($tmp['products_tax_class_id']))

The wrong parameter was being used for the call to tep_get_tax_rate().

 

Here is the fix...please be so kind as to post the solution on the other board as well.

 

Find this code:

	# define the column select list
$column_list = 'p2c.products_id, p2c.categories_id, p.products_image, p.products_price, p.products_ordered';

and change it to this:

	# define the column select list
$column_list = 'p2c.products_id, p2c.categories_id, p.products_image, p.products_price, p.products_tax_class_id, p.products_ordered';

Next, find this code:

$currencies->display_price($tmp['products_price'], tep_get_tax_rate($tmp['products_id']))

and change it to this:

$currencies->display_price($tmp['products_price'], tep_get_tax_rate($tmp['products_tax_class_id']))

All done...

 

As soon as the osCommerce development team releases the contribution standards I'll begin uploading revisions to existing contributions and also upload new ones. However, until there are published standards to reference I will not upload any more code. If someone wanted to update this contribution please feel free to do so.

 

Sorry for the confusion.

 

Bobby

Link to comment
Share on other sites

Thanks Bobby for your very quick reaction time.

 

Will post the link to this fix on the other board and will put a link in the contribution area to this post or the total cure. Let me see.

 

Having read many of your posts also understand your last statement.

 

Just tried in vain for 2 days (with a lot of help) to get another contribution running, it was not one of yours :)

 

Thanks again, Quick Browser Bar is much more neat now and easily adjustable :)

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

  • 3 weeks later...

Hi!

 

I had installed this contribution a few months ago, and now i'm updating it.

 

I have made the changes to exclude current product (the one suggested in the Contribution page, and also the fix posted by Greg Armelin) .

But it doesnt work for me!

It still shows the current product!

 

I have also trying replacing my file with the one by Greg Armelin but nothing changed.

 

is there a minimun of products that must be showed to work?

 

Thanks in advance, and thanks Chemo for this great contrib.

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

I am using this contribution and it is working fine with no problems at all - very impressive. However...

 

As well as being able to select products by category, the user can and will select product by manufacturer - I have put the 'fix for 1064 SQl error' mod in which stops any nasties however I would really like the thumb bar to show the set of products for the selected manufacturer. At the moment it always shows the products from the category of the selected product - which is confusing if the user originally selected a manufacturer.

 

Has anyone been able to (or would like to) adapt this to get the thumb bar to show the set of products by manufacturer? I've been looking at the code but am rather daunted by it!

 

Ed

Link to comment
Share on other sites

  • 2 months later...

when opening some products i get this error:

 

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 'BY products_ordered desc LIMIT 0, 4' at line 1

 

SELECT SQL_CALC_FOUND_ROWS BY products_ordered desc LIMIT 0, 4

 

whats wrong?

Link to comment
Share on other sites

  • 2 months later...

About Mutilanguages!!!

 

I installed this contribution, but I found the title "Quick Browser - Products In This Category" is always the same for the different languages.

 

Anyone knows how to solve it?

 

Thanks in advance.

Link to comment
Share on other sites

I installed this contribution. It display the box with thumbnails very well, but there are not the column right and the footer! Now there is only this message here: "Error! Unable to determine the page link!". What's happened? Anyone can help me?

 

Thanks in advance

gersio

Link to comment
Share on other sites

  • 2 months later...
I installed this contribution. It display the box with thumbnails very well, but there are not the column right and the footer! Now there is only this message here: "Error! Unable to determine the page link!". What's happened? Anyone can help me?

 

Thanks in advance

 

 

Hi anyone,

I'm using sts and had problems with nothing showing at all. I moved the code from product_info.php to includes/sts_display_output.php, and now it shows, but only in the header or footer. have tried to move the code around and also put it in includes/sts_template.html and/or includes/sts-product_infp.php instead, but can't make it work properly.

 

Also it only shows on the page that opens when you click on one of the categories (seems like this is the index.php file). Nothing is showing on the product_info page.

 

If I try to have the code both in includes/sts_display_output.php and in product_info.php, I get errormessage saying for a double call.

 

Can somebody help me here?

Here is the link to my shop to let you see:

 

http://www.kjolebutikken.com/oscdemo1/index.php

 

Thanks:-)

Kjolebutikken

Best regards

Kjolebutikken

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