Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Product Sort Order


Mark Russell

Recommended Posts

Did this ever get figured out? I'm having the same problem....

 

 

OK, I can't wait for this to work. Great, extensive work! Thank you!

 

I do, of course, have a problem:

 

My store uses a different contribution for the layout of products per category. Instead of having 1 product per line working your way down-I have 3 products across & then down.

 

That being said, my catalog/includes/modules/product_listing.php file is completely different & I cannot figure out how to make these 2 contributions work together.

 

I would love to hear from someone who could help me. I would have posted my file contents, but that would be extensive, so I will gladly email someone if they could help.

 

The product layout can be viewed here: www.allstarsportsshop.com/index.php?cPath=1_31

 

Thanks again!

 

C

Edited by willies
Link to comment
Share on other sites

  • Replies 106
  • Created
  • Last Reply

Top Posters In This Topic

I have installed this contribution (up to 1.6), and everything appears to have installed correctly, and it looks as it should in Admin; however, when I change the sort order in Admin, the sort order does NOT change in the catalog. Can anybody PLEASE help? Thank you!

Link to comment
Share on other sites

I have installed this contribution (up to 1.6), and everything appears to have installed correctly, and it looks as it should in Admin; however, when I change the sort order in Admin, the sort order does NOT change in the catalog. Can anybody PLEASE help? Thank you!

 

In case anybody else out there is having this exact problem - triple check your catalog/index.php code. I was missing one line of code, and once that was fixed all was fine.

Link to comment
Share on other sites

  • 1 month later...
Did anyone ever resolve Jack_mcs and algar423's problem with this contrib not working? I installed it without any PHP errors, the "Sort order" boxes show, but changing that number has no effect on the products display...

 

Please help... :(

 

JP

 

I had that problem when I installed at first. I went back to the last index.php backup I had and redid it.

Works great now.

 

 

Rob

Link to comment
Share on other sites

  • 4 weeks later...

This is an amazing contribution...... THANK YOU EVERYBODY THAT HAD A PART IN IT!!!!

 

I have been trying to get it to work with Easy Populate... so that I can just update the field there..... and I am not having luck..... i got it to download..... in fact, I can get it to update an existing product sort.....

 

I just cannot get it to add any NEW products sort without getting an error message

 

 

 

Does anybody have any suggestions???

Link to comment
Share on other sites

  • 2 months later...

I'm having the same problem as Leevera.

 

When I run the SQL, I get this 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 ( 263, 'Display Product Sort Order', 'PRODUCT_SORT_ORDER', '0', 'Do you want to display the Product Sort Order column?', 8, 29, '', '', NULL , NULL ) ;

 

MySQL said:

 

#1062 - Duplicate entry '263' for key 1

 

Has anyone else had this problem and fixed it?

 

I'm stuck at the begining and don't know enough about SQL to know what can and cannot be changed. What is the value 263? Can/should you change it? Is it specific to PS v1.6? Do I need to change anything at all?

Link to comment
Share on other sites

  • 4 months later...

Great Contribution and thanks for all the hard work...

 

Only problem I have is it shows all products in every category in Admin.

If a category has 2 products it shows 2 of every product, if it has 3 products it shows 3 of every product...

 

The correct products in the correct sort order show in the catalog. It makes for difficult management of products..

 

Anyone seen this before...

Thanks

Link to comment
Share on other sites

Hi,

I was impressed with this contribution and was looking for this. However, before this contribution I have installed Separate Price Per Customer (SPPC) - http://www.oscommerce.com/community/contributions,3039

 

Before installing Product Sort I used KDiff to scrutinize the changes in common files. I made changes and included SPPC code to the code of files from Product Sort v1.6 (incl. Infobroker Admin Tool) contribution. However after incorporating the files with my current installation, the catalogue page has become blank there are no errors. Even the same thing happens with the admin catalogue section. Since PHP errors are not displayed and the page is blank I am not able to trace where I have gone wrong. I do not want to take my cart to original and desparetely want to use Product Sort. Can any one help me in sorting out the code issues? Has anyone using SPPC along with Product Sort?

 

Please contact.

Link to comment
Share on other sites

I'm having the same problem as Leevera.

 

When I run the SQL, I get this 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 ( 263, 'Display Product Sort Order', 'PRODUCT_SORT_ORDER', '0', 'Do you want to display the Product Sort Order column?', 8, 29, '', '', NULL , NULL ) ;

 

MySQL said:

 

#1062 - Duplicate entry '263' for key 1

 

Has anyone else had this problem and fixed it?

 

I'm stuck at the begining and don't know enough about SQL to know what can and cannot be changed. What is the value 263? Can/should you change it? Is it specific to PS v1.6? Do I need to change anything at all?

 

I din't find solution and just found another sort order contribution that have to problem for me with intall

Link to comment
Share on other sites

  • 1 month later...
I din't find solution and just found another sort order contribution that have to problem for me with intall

 

The 263 is hardcoded as a configuration key - best to remove it and leave a blank blank value ie ('') and the database will use the next available key number.

Link to comment
Share on other sites

Great contribution - I've installed version 1.4 and working great.

 

We have a lot of products which are used in more than one category and so we need to be able to order the position of a product within each category seperately. So I've stored the order ranking on the products_to_categories table and altered the index.php code accordingly.

 

I'm afraid our code is a bit too far off standard to release as a contribution, but if it helps anyone, just drop me a line,

 

cheers,

 

Dave

Link to comment
Share on other sites

I've got Separate Pricing Per Customer installed too, and really want to implement this contribution. I saw scientica's post and would like to know what I need to do to make sure the contribs work properly together.

Thanks!

Link to comment
Share on other sites

I've installed the contrib in it's entirety twice.

 

I set the order in the back end and the 4 items on my front page do NOT change their sort order!!! HELP PLEASE! They want this done today!!

 

I could just be a complete moron.

 

In the code there are a bunch of case statements. What triggers these? When I put output statements into them, they are never being called. I searched the back end for some kind of switch but I was unable to find anything.

Edited by PenguinMan98
Link to comment
Share on other sites

OK, out of desperation, I hacked it.

 

My page is loading some module called 'new products' instead of using the defaults we modified in the install.

 

/includes/modules/new_products.php

 

find:

	$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 } else {
$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

replace with:

	$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_sort_order ASC, p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 } else {
$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_sort_order ASC, p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

Link to comment
Share on other sites

  • 2 months later...

After installing this mod, when I go to view my products I receive 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 'ASC limit 0, 99' at line 1

select p.products_sort_order, p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, p.products_sort_order, 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_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id, products_to_categories p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '8' order by p.products_sort_order asc ASC limit 0, 99

[TEP STOP]

I've searched through this forum and can't seem to find an answer for where things went wrong. Initially I had some trouble getting the product_sort.sql to run properly, but managed to get it to work thanks to daveboyce's suggestion. I'm no programmer by any means, but I'm usually able to work my way through most problems I've caused for myself. Any ideas as to why I'm receiving this error and what to do about it?

 

Thanks!

Link to comment
Share on other sites

  • 3 months later...
  • 4 weeks later...
  • 3 months later...

After installing Product Sort, 1st 1.4, then 1.6, now 1.7 on rc2a - for some time now, in my product listing in the store, when I click a buy now button - it adds the product to the shopping cart and then changes all the products in the product listing to the same product id. Does anyone else have this issue and a fix?

 

Scott

Link to comment
Share on other sites

I figured out the problem - it wasn't this addon, it was a change made by the cross sell addon.

 

Scott

Link to comment
Share on other sites

  • 3 weeks later...

I have one category with 4 products. How to set order of display of products. for example: product id 1, product id 2, product id 3 and product id 4. I want to show product id 3 in the first row and product id 4 in the second row etc. thanks!

Edited by gr2010
Link to comment
Share on other sites

  • 2 months later...

I have installed Product Sort 1.7 with Master Products.

 

For some reason I can't get the Sort Order Entry box to show up on my Edit/add master product or regular (slave) product. I also don't have any values showing in the Sort Order column in the admin Categories/Products listing. I have set the sort order for my categories.

 

I've searched the forums and poked around in the code myself (I'm VERY far from being a php programmer) and I can't figure out what to do to fix this.

 

Anyone have the answer on how to get Product Sort to work with Master Products.

 

Thanks,

 

Joel

Link to comment
Share on other sites

  • 8 months later...

I have installed Product Sort 1.7 with Master Products.

 

For some reason I can't get the Sort Order Entry box to show up on my Edit/add master product or regular (slave) product. I also don't have any values showing in the Sort Order column in the admin Categories/Products listing. I have set the sort order for my categories.

 

I've searched the forums and poked around in the code myself (I'm VERY far from being a php programmer) and I can't figure out what to do to fix this.

 

Anyone have the answer on how to get Product Sort to work with Master Products.

 

Thanks,

 

Joel

Link to comment
Share on other sites

  • 3 months later...

I have added one product in multiple category, but i want to give sorting position for the product in each category, but sort position should be different for different

category. could any one help me for this.

 

If i update 10th position product to 2nd position, then 2nd position product has to become 3rd and 3rd to 4th like that position has to automatically increase.

 

Could u any one help me.

Link to comment
Share on other sites

Hello,

 

i use this contribution and it works great.

But ther is one thing i miss.

some catagories i want too order on the item name lake appel, bread, c.. or 1001, 2005, 3.. for example.

but since the install it orders very strange for items without a sort_order number.

these products ar a few large catagories so sort by hand is too much work.

 

can some one help me out.

 

i just need some thing like

 

no sort order number the sort desc or something

 

Regards,

 

jasper

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