Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

When you select a category it will list the products and you can sort them by name or by price. I want to comment out the sort by price. What file and where do I comment this out?

 

thanks

Posted
When you select a category it will list the products and you can sort them by name or by price. I want to comment out the sort by price. What file and where do I comment this out?
Read the code, it says in line 66 in includes/modules/product_listing.php:

$lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);

and indeed, if you add the price to the condition above it the sorting is gone:

//	if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') && ($column_list[$col] != 'PRODUCT_LIST_PRICE') ) {
  $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);
}

Posted
Read the code, it says in line 66 in includes/modules/product_listing.php:

$lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);

and indeed, if you add the price to the condition above it the sorting is gone:

//	if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') && ($column_list[$col] != 'PRODUCT_LIST_PRICE') ) {
  $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);
}

 

Hey Jan, thanks again. I wouldn't mind leaving the sort by price in but here is the problem I'm having with it. The way I'm using the quantity price break is this, for one seminar ticket you pay regular seminar fee, for each additonal student you will get a 10% discount. So, for example a course will cost $210 for the first person and for any additional students it will cost 189 (a 10% discount). The way I have to enter it in the admin section for say level 3 or quantity of 3 tickets for that seminar would be 189*2 + 210 = 588 then I have to divide 588 by 3 = 196. Now when they order 3 tickets the correct price of $588 will show. Now the price sort will show prices low to high $210 - $588 and the amount $588 is not a price for one seminar ticket but for 3. That is why I want to comment out the price sort.

 

Thanks again, hope you understand what I'm trying to say here but I will comment out the price sort as you pointed out for now.

Posted
I wouldn't mind leaving the sort by price in but here is the problem I'm having with it. The way I'm using the quantity price break is this, for one seminar ticket you pay regular seminar fee, for each additonal student you will get a 10% discount. So, for example a course will cost $210 for the first person and for any additional students it will cost 189 (a 10% discount). The way I have to enter it in the admin section for say level 3 or quantity of 3 tickets for that seminar would be 189*2 + 210 = 588 then I have to divide 588 by 3 = 196. Now when they order 3 tickets the correct price of $588 will show. Now the price sort will show prices low to high $210 - $588 and the amount $588 is not a price for one seminar ticket but for 3. That is why I want to comment out the price sort.
I don't get it. What I assume you need to enter in the admin is for two tickets $ 199.50 and for three $ 196. Then the low price would be 196 and the high price 210. I don't see where the $ 588 comes in play.

 

Of course you could also change the way PriceFormatter calculates the price, to suit the way you handle prices...

Posted

Hi Jan, that removed the sorting but it still shows two prices in the table. Here is a link to the page I'm talking about - http://www.nespapool.org/osCommerce/catalo...35f06e736a1ffdc

 

You will see the prices $171.09 - $187.50 . If I can just show the regular price of 187.50 or Quantity one price. If I can't do that then how can I remove the price column from showing at all on this page.

Posted
You will see the prices $171.09 - $187.50 . If I can just show the regular price of 187.50 or Quantity one price.
Then simply go back to the default code that was commented out "removed for price break modification" and instead comment out the two lines that were added to show this price break:

			$pf->parse($listing[$x]);
		$lc_text = $pf->getPriceStringShort();

Posted (edited)
Then simply go back to the default code that was commented out "removed for price break modification" and instead comment out the two lines that were added to show this price break:

			$pf->parse($listing[$x]);
		$lc_text = $pf->getPriceStringShort();

 

Thanks JanZ, that did work but the PRICE heading is still showing and the item name is doubled in the table. If you look at the link http://www.nespapool.org/osCommerce/catalo...6dd6a58d0291108 you will see what I'm talking about.

 

Again, thanks for all you help I really apprecitate it.

 

:blush:

Edited by aguzman
Posted
Thanks JanZ, that did work but the PRICE heading is still showing and the item name is doubled in the table. If you look at the link http://www.nespapool.org/osCommerce/catalo...6dd6a58d0291108 you will see what I'm talking about.

 

Again, thanks for all you help I really apprecitate it.

 

:blush:

 

I was able to remove the table headings but the product name still shows twice.

 

See here - http://www.nespapool.org/osCommerce/catalo...6dd6a58d0291108

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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