Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Listing Enhancements, Thumbnails & Manufacturer Headings


spooks

Recommended Posts

Sam thanks for your reply. Yes I know that this mod shows the current category name. I was wondering if it could be changed to show the subcategory name instead for the listed products.

What I mean I have a category BAKERY with subcategories MUFFINS, CROISSANTS, DANISHES, etc. Instead of having BAKERY on all the titles, I want if possible to have the MUFFINS, CROISSANTS, DANISHES, etc. when clicked on. Hope I made my self clear.

 

Thanks in advance.

 

 

I see now, what you did'nt say was that bakery is also a sub-category, this change should sort it:

 

within line 414 find:

 

strpos($_GET['cPath'],'_')+1),$languages_id)

replace with:

 

strrpos($_GET['cPath'],'_')+1),$languages_id)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

I see now, what you did'nt say was that bakery is also a sub-category, this change should sort it:

 

within line 414 find:

 

strpos($_GET['cPath'],'_')+1),$languages_id)

replace with:

 

strrpos($_GET['cPath'],'_')+1),$languages_id)

 

Sam thanks again on your reply. I will make the change when I get home tonight and I will let u know if it worked. Thanks again for your help.

Link to comment
Share on other sites

If you add/create any new pages that call the listing you must add the changes detailed for Tool tip images & rounded corners in IE for those pages too if you set Product Listing Image zoom on hover to true

 

Otherwise you also need to adjust your style sheet to make the listing suit your site, firefox and its web developer & firebug plugins will help you do that.

 

tnx for the reply sir.. if i will apply them too will it fix the layout coz my whole header is messed up and the whole listing box is not aligned. I am guessing i need to change the whole shop_by_price.php to look like product listings?

Link to comment
Share on other sites

I guess theres more than one way to skin a chicken, :o

I had the same issue and that't what worked for me B)

 

Of course, there may be better ways.

 

God, what was I thinking? just trying to help. :lol:

 

((Ok, time to give some back to the community!))

 

Here are addon pages to this wonderfully contribution created by Sam.

 

Best Sellers page

Featured products page

Coming So om page

Bundled products page

 

You can download it here:

Addon Pages

 

This link will be active for the next 30 days.

Out of respect for Sam and his hard work, I have not added this

addon package to his contribution. It will be at his discretion wether

he wants to revise the scripts and add them to his contribution him self.

I the event that addon pages are included after 30 days,

I will add this package to oscommerce in a separate contribution

for all to enjoy.

 

Once again, thank you Sam for this wonderfully contribution! :D

 

In addition to the Addon pages posted aerier,

 

Here are the matching addon MODULES to this wonderfully contribution created by Sam.

 

Best Sellers module

Featured products module

Coming So om module

Bundled products module

&

Specials module

 

I have Updated the earlier package and added the modules.

 

You can download the full package here:

Addon Pages & Modules

 

Regarding the integration of the modules with iframe ajaxtabs (Mission accomplished)! (See)

As for Lightbox:

I can't seem to get the Lightbox working in ajaxtabs, Can anybody help?

 

As for Iframe to auto size Height according to content:

Anybody got the skills? :D

 

Any help will be greatly appreciated!

 

Ronnie

Edited by ronrrico
Link to comment
Share on other sites

I need to Shorten my short description a bit is it safe just to change the sql entry to like 100 or 150 will it discard the exta ? what would be the best way to hand this ?

 

THanks In Advance

 

Marvin

Link to comment
Share on other sites

I need to Shorten my short description a bit is it safe just to change the sql entry to like 100 or 150 will it discard the exta ? what would be the best way to hand this ?

 

THanks In Advance

 

Marvin

 

 

If your talking of the truncated description, just set it in admin to whatever you want, if your talking of the short description contribution, the support thread for that is elsewhere. wink.gif

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

My link

 

hello sir sam i have added <?php include (DIR_WS_INCLUDES . 'page-header-inc.htc'); ?>

for the image tootl tip.. what else do i have to fix on shp_by_price.php to fix my page to look like products listings..? help

 

 

fix the errors on the page http://validator.w3.org/check?uri=http%3A//www.atickmobiles.com.au/shop/shop_by_price.php%3FosCsid%3D45a549fe1edf3b3780d936472d5ece0d%26range%3D1%26osCsid%3D45a549fe1edf3b3780d936472d5ece0d

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

hello ty for directing me to that too many errors haha this is bad.. how can i locate the php file to fix sir? i guess its all mixed up coz isee some codes from my header

Link to comment
Share on other sites

In addition to the Addon pages posted aerier,

 

Here are the matching addon MODULES to this wonderfully contribution created by Sam.

 

Best Sellers module

Featured products module

Coming So om module

Bundled products module

&

Specials module

 

I have Updated the earlier package and added the modules.

 

You can download the full package here:

Addon Pages & Modules

 

Regarding the integration of the modules with iframe ajaxtabs (Mission accomplished)! (See)

As for Lightbox:

I can't seem to get the Lightbox working in ajaxtabs, Can anybody help?

 

As for Iframe to auto size Height according to content:

Anybody got the skills? biggrin.gif

 

Any help will be greatly appreciated!

 

Ronnie

 

 

Hi, Have you looked at using DIV's instead of Iframes, last I played with Iframes they were limited to fixed sizes, remember not to rely to much on javascript, not all visitors have it.

 

There are issues with your demo pages in IE, have you noted?

 

Sorry I don't have time to assist with this right now, but keep up the good work. smile.gif

 

PS What is the difference between your specials & the one in the package since 2.7?

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

hello ty for directing me to that too many errors haha this is bad.. how can i locate the php file to fix sir? i guess its all mixed up coz isee some codes from my header

 

 

Use the validator view source option, then together with the html comment lines within the php files you can locate the problem, your main layout issues are related to failing to open/close table elements correctly.

 

I would ignore warnings for now.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Hi, Have you looked at using DIV's instead of Iframes, last I played with Iframes they were limited to fixed sizes, remember not to rely to much on javascript, not all visitors have it.

 

There are issues with your demo pages in IE, have you noted?

 

Sorry I don't have time to assist with this right now, but keep up the good work. smile.gif

 

PS What is the difference between your specials & the one in the package since 2.7?

 

Hi Sam, Using Div's insteat of iframes would of been th easy way to go, but it would of taken away the beauty of navigating within the tab using the drops, rss, and stitch, while still being able to correctly brake out of iframe when wanting to visit prod_info or adding to cart. I found a demo oline that fixe's auto-height with ajaxtabs, just having a hard time applying it to my site. Jusa matter of time Sam. B)

 

((((There are issues with your demo pages in IE, have you noted?)))))

:o Opsss I for got to set back the standard Osc hrader controlers.

 

Fix for all pages:

 

Find:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

 

And replace with:

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

 

I will update the header controler on pages now ....sorry :'(

 

(((((PS What is the difference between your specials & the one in the package since 2.7?)))))

The specials I uploaded is a module, you have the page in 2.7.

 

Hasta la vista!

Ronnie

Link to comment
Share on other sites

I see now, what you did'nt say was that bakery is also a sub-category, this change should sort it:

 

within line 414 find:

 

strpos($_GET['cPath'],'_')+1),$languages_id)

replace with:

 

strrpos($_GET['cPath'],'_')+1),$languages_id)

 

Sam it worked perfectly. Thanks again!!! :thumbsup:

Link to comment
Share on other sites

Hi Sam and everyone.

 

I'm starting to make some progress with this contribution on my test site and am delighted that SaleMAker is now supported. I downloaded the latest package and started a fresh so i was up to date.

One problem i am having though is with the 'buy now' button. Previously if the product had options the buy now button would go to the product page for the user customer to select the relavant options., if theproduct had no options it would be added to cart. Now i have installed this contribution the buy now button always adds the product to the cart, regardless of if options are available. This means that customers can go ahead and order a T-Shirt for example and checkout without ever being propted for colour or size.

 

Any advice and guidance gratefully received as always.

 

Matt

Link to comment
Share on other sites

if the product has options the buy now button should go to the product page if not set

Hi Sam and everyone.

 

I'm starting to make some progress with this contribution on my test site and am delighted that SaleMAker is now supported. I downloaded the latest package and started a fresh so i was up to date.

One problem i am having though is with the 'buy now' button. Previously if the product had options the buy now button would go to the product page for the user customer to select the relavant options., if theproduct had no options it would be added to cart. Now i have installed this contribution the buy now button always adds the product to the cart, regardless of if options are available. This means that customers can go ahead and order a T-Shirt for example and checkout without ever being propted for colour or size.

 

Any advice and guidance gratefully received as always.

 

Matt

 

You have changed smthg else!!

 

 

The listing file does not directly go to the product page, except for details/image/name links etc, when the add to cart is pressed all 'set' prams are sent for processing by application top, its the code in application top that checks if the product has attributes, then are those set, if not divert to the product page, you will be aware that I,ve made no recent changes to the application top code.

 

So it would appear either your application top does not contain my code, or has been modified.

 

Or perhaps you never completed the install!! wink.gif

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

if the product has options the buy now button should go to the product page if not set

 

You have changed smthg else!!

 

 

The listing file does not directly go to the product page, except for details/image/name links etc, when the add to cart is pressed all 'set' prams are sent for processing by application top, its the code in application top that checks if the product has attributes, then are those set, if not divert to the product page, you will be aware that I,ve made no recent changes to the application top code.

 

So it would appear either your application top does not contain my code, or has been modified.

 

Or perhaps you never completed the install!! wink.gif

 

Hi Sam

 

Thanks for the quick reply.

 

I'm sorry i didn't make myself clear. It went to the product page if options had to be set beofre i installed the contribution, since i have installed, and made the amends to application top, i find that it does not go to the product page.

 

So in my old layout clicking buy now on t-shirts would go to the t-sirts page. Then i installed the contribution and now it just adds t-shirt to cart. I dont actually sell t-shirts, this is just a good example.

What files can i perhaps show you so that you ,ight be able to check? I followed the installation instructions carefully, and did make the changes to app top as instructed.

 

I'm getting worried now this isn't an easy fix :(

Link to comment
Share on other sites

 

 

Please re-read my last, you are getting confused!!

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Please re-read my last, you are getting confused!!

 

Argh, you were right, the change hadn't been made to app top (i was sure i had) :blush:

 

Okay - new problem , i'm afriad the change is betond me as i have the QT Pro contribution so my code for the app top section that needs changing looks like this:

// customer adds a product from the products page
     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
//++++ QT Pro: Begin Changed code
                               $attributes=array();
                               if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) {
                                 $attrlist=explode(',',$HTTP_POST_VARS['attrcomb']);
                                 foreach ($attrlist as $attr) {
                                   list($oid, $oval)=explode('-',$attr);
                                   if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval)
                                     $attributes[$oid]=$oval;
                                 }
                               }
                               if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) {
                                 foreach ($HTTP_POST_VARS['id'] as $key=>$val) {
                                   if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)
                                     $attributes=$attributes + $HTTP_POST_VARS['id'];
                                 }
                               }

                               $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes);								
//++++ QT Pro: End Changed Code

                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;

 

I'm really sorry to be such a pain and to keep asking for help but can you provide any guidance on how i make change this QT Pro code to support the contribution?

 

Thanks

Matt

Link to comment
Share on other sites

Please re-read my last, you are getting confused!!

 

 

Perhaps I should make thinks clear, with the current listing code and application top code, if the product has options the buy now button will go to the product page if options not set . wink.gif

 

 

That functionality has been tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a on a number of servers, so your behaviour is non standard, unless you can give a reason for you varience (odd server behaviour) you need to find why your code is not behaving normally.

 

Every time someone has an issue they say 'I've installed perfectly & checked many times' yet 99% of the time ther issue turns out to be due to thier own error!! crying.gif

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Argh, you were right, the change hadn't been made to app top (i was sure i had) blush.gif

 

Okay - new problem , i'm afriad the change is betond me as i have the QT Pro contribution so my code for the app top section that needs changing looks like this:

// customer adds a product from the products page
     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
//++++ QT Pro: Begin Changed code
                               $attributes=array();
                               if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) {
                                 $attrlist=explode(',',$HTTP_POST_VARS['attrcomb']);
                                 foreach ($attrlist as $attr) {
                                   list($oid, $oval)=explode('-',$attr);
                                   if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval)
                                     $attributes[$oid]=$oval;
                                 }
                               }
                               if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) {
                                 foreach ($HTTP_POST_VARS['id'] as $key=>$val) {
                                   if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)
                                     $attributes=$attributes + $HTTP_POST_VARS['id'];
                                 }
                               }

                               $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes);								
//++++ QT Pro: End Changed Code

                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;

 

I'm really sorry to be such a pain and to keep asking for help but can you provide any guidance on how i make change this QT Pro code to support the contribution?

 

Thanks

Matt

 

We cross posted!!

 

So it was a case of you insisting you done what you did'nt do, as I said, common issue!! laugh.gif

 

Looking at that QTPro code I wonder if its all really needed, but there is a simple work around for now, add my code as is, alter the code you have:

 

// customer adds a product from the products page

case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

//++++ QT Pro: Begin Changed code

 

change the 'add_product' to 'add_product_qt' leaving the code below it as is (ie upto :

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;

 

then in your product_info file, find 'add_product' and change to 'add_product_qt'

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Perhaps I should make thinks clear, with the current listing code and application top code, if the product has options the buy now button will go to the product page if options not set . wink.gif

 

 

That functionality has been tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a on a number of servers, so your behaviour is non standard, unless you can give a reason for you varience (odd server behaviour) you need to find why your code is not behaving normally.

 

Every time someone has an issue they say 'I've installed perfectly & checked many times' yet 99% of the time ther issue turns out to be due to thier own error!! crying.gif

 

Thanks for your patience.

 

What i was trying to say in my last post was that you are correct, i have not completed the installation correctly. I have been unable to add the required code to the apllication top file because changes have already been made to this file by the QT Pro contribution. This means that i can not just replace the block of code shown in the installation file because i have already amended this code for the QT Pto contribution.

 

I know that changes need to be made to the 'add_product' case but as i have an amended piece of code in here already i am not sure what changes to make.

 

Standard osC 'add product' case looks like this:

  // customer adds a product from the products page			
     case 'add_product' : 
if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
    $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
}
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
break; 

 

and you provide great instructions for how to replace this with new code required for this contribution.

 

My 'add product' case looks like this:

// customer adds a product from the products page
     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
//++++ QT Pro: Begin Changed code
                               $attributes=array();
                               if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^\d{1,10}-\d{1,10}(,\d{1,10}-\d{1,10})*$/",$HTTP_POST_VARS['attrcomb']))) {
                                 $attrlist=explode(',',$HTTP_POST_VARS['attrcomb']);
                                 foreach ($attrlist as $attr) {
                                   list($oid, $oval)=explode('-',$attr);
                                   if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval)
                                     $attributes[$oid]=$oval;
                                 }
                               }
                               if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) {
                                 foreach ($HTTP_POST_VARS['id'] as $key=>$val) {
                                   if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)
                                     $attributes=$attributes + $HTTP_POST_VARS['id'];
                                 }
                               }

                               $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes);								
//++++ QT Pro: End Changed Code

                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;

 

And as you can see is very different as a result of having the QT Pro contribution.

 

 

I understand that i will need to make changes to this for the 'Buy Now' button to work, but i am not sure what changes to make as i am not very confident or skilled with code.

 

Please can you help me to change my already re-worked application top file so that i can get the Buy Now button working.

 

Matt

Link to comment
Share on other sites

We cross posted!!

 

So it was a case of you insisting you done what you did'nt do, as I said, common issue!! laugh.gif

 

Looking at that QTPro code I wonder if its all really needed, but there is a simple work around for now, add my code as is, alter the code you have:

 

 

 

change the 'add_product' to 'add_product_qt' leaving the code below it as is (ie upto :

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;

 

then in your product_info file, find 'add_product' and change to 'add_product_qt'

 

 

That worked a charm. Thank you so much for your help.

:thumbsup:

Matt

Link to comment
Share on other sites

All is looking good. I have one more question though if you could please help.

 

I have added the new_products file to the includes/modules folder and it displays as expected on the homepage. I have set the maximum value in admin to display just 4 products so it only shows one row (i have it set to thumbnails, 4 per row).

 

I have also edited the file so the sort order is random.

 

What i would like to know is how i can remove the following from the bottom of the page:

"Displaying 9 to 12 (of 22 products) Result Pages: [<< Prev] 1 2 3 4 5 ... [Next >>] "

 

I dont want this to offer additional pages, just show the 4 products i set in the maximum value. As I have it set to random it means that clicking through the pages is a silly exercise anyway as you are as likely to just see the same products time and time again as they are randomly displayed as the page loads.

 

Please let me know if i am not clear as i know i have a habit of overcomplicating things and not expalining very clearly.

 

Thanks

Matt

Link to comment
Share on other sites

How do I limit product shown

 

 

Did you set the right limit?, to set limits for that module see How do I limit product shown http://forums.oscomm...howtopic=347085

 

 

Did you look at my other replies? http://www.oscommerce.com/forums/topic/307010-product-listing-enhancements-thumbnails-manufacturer-headings/page__view__findpost__p__1472772

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

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