Jump to content



Photo
- - - - -

% off filter box or sort by % discount ?


This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1   bruyndoncx

bruyndoncx

    osCommerce Teenager

  • Members
  • 3,657 posts

Posted 03 July 2012 - 19:26

I'm thinking , it cant be it hasn't been done before ...

I'm looking for a contribution that operates like a shop by price infobox, but then based on the % discount.

anyone knows of one ?

I've googled all kinds of different combinations of oscommerce with discount / percentage / specials infobox, what am i missing ?

The reason why I'm asking this, although it wouldn't be too hard to code something simple up, i think it would heart performance quite a bit without proper caching etc, so it might need a bit more elaborate to take caching into account, especially if the filter would be dynamic based on other selected categories or manufacturers etc
KEEP CALM AND CARRY ON

Any interesting post shared is just to inspire, take it or leave it, I don't care.
We all have different stores and businesses with different needs.
Luckily there isn't a one size fits all, or we wouldn't be here at all !

FYI Just upgraded from PHP 5.3 to PHP 5.5  and saw big performance improvement.
But be aware php 5.5 is more strict about things.
UTF8-without BOM, no extra spaces allowed at the beginning or end of your php file, or your redirects wont work.
No double declarations of functions allowed - used to slip through the cracks ...

#2   burt

burt

    Herder of Cats

  • Community Team
  • 11,835 posts

Posted 03 July 2012 - 21:03

I've never seen anything like this. Would be interested to see what you can come up with.

This is a signature that appears on all my posts.  It is not specifically aimed at you.

 

IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
If you are still on the old style osCommerce, it is time to move to Responsive.

 


#3   FWR Media

FWR Media
  • Members
  • 6,839 posts

Posted 03 July 2012 - 21:23

Not sure I understand this fully .. would you have a shop by price header then a shop by percentage discount header?

Edited by FWR Media, 03 July 2012 - 21:24.


#4   burt

burt

    Herder of Cats

  • Community Team
  • 11,835 posts

Posted 03 July 2012 - 21:33

Well, I intrigued myself. Filtering on the specials page.



Did this by adding in an extra column in the DB to hold the percent discount amount (2 lines of code in admin/specials.php).
Then a quick and dirty couple of links in specials.php and a switch to grab what the filter is (and change the SQL appropriately).

Might give you ideas?

This is a signature that appears on all my posts.  It is not specifically aimed at you.

 

IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
If you are still on the old style osCommerce, it is time to move to Responsive.

 


#5   bruyndoncx

bruyndoncx

    osCommerce Teenager

  • Members
  • 3,657 posts

Posted 03 July 2012 - 21:39

Not sure I understand this fully .. would you have a shop by price header then a shop by percentage discount header?

Overall I like the shop by price best on index and category pages, but on specials/promotion pages and outlet/clearance pages, I would like to focus on the % discount and present it in a similar way, and allow sorting by price
KEEP CALM AND CARRY ON

Any interesting post shared is just to inspire, take it or leave it, I don't care.
We all have different stores and businesses with different needs.
Luckily there isn't a one size fits all, or we wouldn't be here at all !

FYI Just upgraded from PHP 5.3 to PHP 5.5  and saw big performance improvement.
But be aware php 5.5 is more strict about things.
UTF8-without BOM, no extra spaces allowed at the beginning or end of your php file, or your redirects wont work.
No double declarations of functions allowed - used to slip through the cracks ...

#6   bruyndoncx

bruyndoncx

    osCommerce Teenager

  • Members
  • 3,657 posts

Posted 03 July 2012 - 21:42

Well, I intrigued myself. Filtering on the specials page.

http://www.youtube.com/watch?v=kqxfVKjV-z0&feature=youtu.be

Did this by adding in an extra column in the DB to hold the percent discount amount (2 lines of code in admin/specials.php).
Then a quick and dirty couple of links in specials.php and a switch to grab what the filter is (and change the SQL appropriately).

Might give you ideas?


Actually, you show sorting, not filtering.
Backend wise, yes an extra database field would be needed as a first step
KEEP CALM AND CARRY ON

Any interesting post shared is just to inspire, take it or leave it, I don't care.
We all have different stores and businesses with different needs.
Luckily there isn't a one size fits all, or we wouldn't be here at all !

FYI Just upgraded from PHP 5.3 to PHP 5.5  and saw big performance improvement.
But be aware php 5.5 is more strict about things.
UTF8-without BOM, no extra spaces allowed at the beginning or end of your php file, or your redirects wont work.
No double declarations of functions allowed - used to slip through the cracks ...

#7   bruyndoncx

bruyndoncx

    osCommerce Teenager

  • Members
  • 3,657 posts

Posted 03 July 2012 - 21:52

I've just looked at johnlewis.co.uk where I have the impression that the clearance% off grouping is setup as a product specification.
Since I already have product specifications by @ kymation installed, if I add the field to the product table, I can just use that to filter as it will allow filtering on any product table field, a field in the specials table would require much more changes.

Edited by bruyndoncx, 03 July 2012 - 21:54.

KEEP CALM AND CARRY ON

Any interesting post shared is just to inspire, take it or leave it, I don't care.
We all have different stores and businesses with different needs.
Luckily there isn't a one size fits all, or we wouldn't be here at all !

FYI Just upgraded from PHP 5.3 to PHP 5.5  and saw big performance improvement.
But be aware php 5.5 is more strict about things.
UTF8-without BOM, no extra spaces allowed at the beginning or end of your php file, or your redirects wont work.
No double declarations of functions allowed - used to slip through the cracks ...

#8   burt

burt

    Herder of Cats

  • Community Team
  • 11,835 posts

Posted 03 July 2012 - 22:04

Ah, yeah, silly me. Just a case of rearranging the SQL and links I suppose.


This is a signature that appears on all my posts.  It is not specifically aimed at you.

 

IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
If you are still on the old style osCommerce, it is time to move to Responsive.

 


#9   burt

burt

    Herder of Cats

  • Community Team
  • 11,835 posts

Posted 03 July 2012 - 22:27

1 last one for tonight, promise lol



Sorting and Filtering together. Quick and dirty obviously.

This is a signature that appears on all my posts.  It is not specifically aimed at you.

 

IF YOU MAKE A POST REQUESTING HELP...please state the exact version of osCommerce that you are using. THANKS
 
If you are still on the old style osCommerce, it is time to move to Responsive.

 


#10 ONLINE   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 9,321 posts

Posted 04 July 2012 - 02:09

@ bruyndoncx
You don't need to add a field to the products table. Just set up a new Specification and filter on that.

Regards
Jim

See my profile for a list of my addons and ways to get support.


#11   bruyndoncx

bruyndoncx

    osCommerce Teenager

  • Members
  • 3,657 posts

Posted 04 July 2012 - 18:19

@ bruyndoncx
You don't need to add a field to the products table. Just set up a new Specification and filter on that.

Regards
Jim

Yes that is true, but I tend to do quite a bit of price and promotion updates by bulk on admin and through easypopulate.
If I can get triggers going on my database, that would be ideal to maintain a derived field.
Otherwise, I need to amend the logic to update the discount field in a few areas in my admin, adding it to the products (or specials) table overall would be easiest.
I do not want to enter a specification explicitly, it needs to be calculated from the prices, either through a trigger, or a sql script and/or in each page that possibly updates one of the prices.
If I show prices on listings, data is fetched from products and specials tables, having to add specifications would slow things down further, stroughling already now ...
KEEP CALM AND CARRY ON

Any interesting post shared is just to inspire, take it or leave it, I don't care.
We all have different stores and businesses with different needs.
Luckily there isn't a one size fits all, or we wouldn't be here at all !

FYI Just upgraded from PHP 5.3 to PHP 5.5  and saw big performance improvement.
But be aware php 5.5 is more strict about things.
UTF8-without BOM, no extra spaces allowed at the beginning or end of your php file, or your redirects wont work.
No double declarations of functions allowed - used to slip through the cracks ...