CMS MADE SIMPLE FORGE

Products

 

[#6792] Summary results based on multiple fields and field values

avatar
Created By: Peter Stubbs (applejack1923)
Date Submitted: 2011-08-19 11:07

Assigned To: Robert Campbell (calguy1000)
Resolution: None
State: Closed
Summary:
Summary results based on multiple fields and field values
Detailed Description:
Hi Robert

I am doing a large site and using the Products module as a catalogue type module
and I need to be able to return results using the summary mode on more than one
custom field and their values. Is there anyway this can be done at the moment. I
would really appreciate it if you could get back to me asap as this is somewhat
urgent.

History

Comments
avatar
Date: 2011-08-19 11:19
Posted By: Robert Campbell (calguy1000)

This is not possible at the moment.... there is no advanced query language for
the products module.  This would have to be a sponsored modification.  Can you
please provide details to what you need?
      
avatar
Date: 2011-08-19 12:06
Posted By: Peter Stubbs (applejack1923)

Hi Robert thanks for getting back to me so quickly

The current type of search is

{Products fieldid='4' fieldval='val1' sortorder='asc'
summarytemplate='collection' excludecat='C' pagelimit='12'}

And by adding conditional statements within the foreach loop of the summary
template I am able to restrict the output to additional custom fields and
specified values. The problem is that the pagination is then wrong.

So either in the summary call

{Products fieldid='4,6,7,8' fieldval='val1,val3,val12,val9' sortorder='asc'
summarytemplate='collection' excludecat='C' pagelimit='12'}

Or

{Products fieldid='4' fieldval='val1' AND fieldid='6' fieldval='val3' AND
fieldid='7' fieldval='val12' AND fieldid='8' fieldval='val9' sortorder='asc'
summarytemplate='collection' excludecat='C' pagelimit='12'}

Anyhow please let me know how much this might cost and how soon it could be done
as it is very urgent.

Thanks.
      
avatar
Date: 2011-08-19 12:29
Posted By: Robert Campbell (calguy1000)

AND and OR relationships in the same smarty tag would be very difficult to
(would have to basically write an expression evaluator)... it would have to be
one or the other.

i.e:  something like query="field1=a||field2=b||field3=c"  for an OR
relationship
or   query="field1=a&&field2=b&&field3=c" for an AND relationship

Probably about 4 hours worth of work to get this working, as I have to rewrite
the summary query stuff significantly.  I'd also get rid of the fieldid= and
fieldval stuff at the same time (as they would be redundant).   My rate is
$75CAD per hour, so that'd be $300CAD.   with 1/2 due upfront.
      
avatar
Date: 2011-08-19 12:40
Posted By: Peter Stubbs (applejack1923)

For what is is the Smarty tag call whatever you feel is the best and neatest.

Re: I'd also get rid of the fieldid= and fieldval stuff at the same time (as
they would be redundant). This I don't care about but others who are already
using this might not be too happy.

Obviously the results would still have to be sortable in the same way as
currently.

How soon can you do this?
      
avatar
Date: 2011-08-19 12:59
Posted By: Robert Campbell (calguy1000)

I have a todo list for Today, and Saturday is the day I release the 1.10 beta...
so I can probably do this on Sunday.
      
avatar
Date: 2011-08-19 13:06
Posted By: Peter Stubbs (applejack1923)

Ok fine is $300 the final figure? So let me know how I can pay you the 50%
upfront.
      
avatar
Date: 2011-08-19 13:10
Posted By: Robert Campbell (calguy1000)

Yep, that's the final figure for that adjustment.
      
avatar
Date: 2011-08-19 13:16
Posted By: Peter Stubbs (applejack1923)

Ok fine Robert please go ahead and let me have you Paypal account or who ever
you use.
      
avatar
Date: 2011-08-19 18:05
Posted By: Peter Stubbs (applejack1923)

Hi Robert

If need be email me directly at mail at applejack.co.uk
      
avatar
Date: 2011-08-19 22:35
Posted By: Peter Stubbs (applejack1923)

Hi Robert

What is the possibility of also adding to this a negative option so fieldval !=
whatever as well as the positive values? I need to know as I am constructing the
db structure
      
avatar
Date: 2011-08-19 22:42
Posted By: Peter Stubbs (applejack1923)

Actually forget about the negative sorry it is late here and I have had a crazy
week with this project I need to go to bed...
      
avatar
Date: 2011-08-22 15:19
Posted By: Peter Stubbs (applejack1923)

Hi Robert

Can you please let me know what is happening re you doing the work to sort out
the multiple custom fields option summary mode as this site is actually due to
go live tomorrow so time is getting short.

Thanks.
      
Updates

Updated: 2014-12-20 14:10
state: Open => Closed

Updated: 2011-08-19 12:29
resolution_id: => 5