• eCommerce
  • Social and Community Suite
  • Content Management
  • RSS Extensions
  • VirtueMart Extensions
Follow us on Twitter   Join The Factory on the New Digg  
(0) | Login | Register | Lost Password?
Username: Password:  
Home
Our Products
Joomla 1.7.x  (23) & J!1.6.x
Joomla 1.5.x (28)
Joomla 1.0.x (17)
Factory Club Extensions (7)
Drupal, Elxis, MODx (6)
Windows Gadgets for J! (11)
Free Templates (4)
All Products (92)
Documentation
Tweets
Forum
Contact Us
Terms & Conditions
How to Buy Guide
Customers FAQ's
Updates & Upgrades
About Us
The Factory Demo Server for Joomla Extensions
Money Back Guarantee
Payment Methods for Joomla Extensions
Follow us on Facebook

Latest Tweets

  • Join us at the Joomladay UK!
  • The Factory Extensions Joomla Compatibility Chart
  • Love Factory 2.4 for Joomla 1.7
  • Love Factory - Memberships [VIDEO]
  • Love Factory - Custom Fields Integration [VIDEO]
  • Love Factory - Google Maps Integration [VIDEO]
  • Love Factory - Administrator Guide [VIDEO]
  • Love Factory - Memberships
  • Collection Factory for Joomla 1.6 with CB support
  • Reverse Auction Factory 1.5.9
 
   Home   Help Search Login Register  
The Factory > Forum > eCommerce Factory Suite for Joomla CMS. > Reverse Auction Factory > update E-mail on new entries with state filter
Pages: [1]
« previous next »
  Print  
Author Topic: update E-mail on new entries with state filter  (Read 861 times)
davidhof
Jr. Member
**
Posts: 56


View Profile
update E-mail on new entries with state filter
« on: March 14, 2010, 12:00:21 am »

Hello,

bidders can recieve E-mails when new entries have been filled.
But most bidders only want to recieve e-mails with entries located in specific states ... is there a simple work around to achieve this Huh

greetings

Logged
Factory Staff 02
The Factory Staff
Hero Member
*
Posts: 1912



View Profile
Re: update E-mail on new entries with state filter
« Reply #1 on: March 19, 2010, 04:39:12 pm »

I 'm not getting exactly what do you mean.
My first impression is that you want that users in State  x should receive mails when new entries in state x added.
If that is it, basically you must work around the
//Notify Category  Watchlist  area
in the cron file.
But depends on what to you mean "state" to actually add the query and php code.

Sorin
Logged

The Factory's Development Team member.
davidhof
Jr. Member
**
Posts: 56


View Profile
Re: update E-mail on new entries with state filter
« Reply #2 on: March 24, 2010, 02:22:08 pm »

Hi Sorin,

Your first impression is right ... almost all first impressions are always right  Cheesy

about adjusting the cron file ... that means this option goes for everbody.

it would be nicer if a bidder could choose what he wants.
Because some bidders live near borders of two states

for example
i want to recieve new entries mails from

category A  - state a and c
category B  - state d
category C  - all states

I think to achieve this the categories template + database does need a modification as well
This would be a great plus for the service abbility from the component.





 



 
Logged
davidhof
Jr. Member
**
Posts: 56


View Profile
Re: update E-mail on new entries with state filter
« Reply #3 on: April 13, 2010, 11:34:38 pm »

Hi Sorin,

Could you respnd on my last posting please ?

Logged
Factory Staff 02
The Factory Staff
Hero Member
*
Posts: 1912



View Profile
Re: update E-mail on new entries with state filter
« Reply #4 on: April 14, 2010, 03:24:31 pm »

Again this is a matter of coding style.
But, here is a sample of code (untested - the code is just explanatory for the algorithm ) assuming the following:
1. You have an state field in the user profile table (reverse default or CB )
2. You will create a category_state table wich you will be filling manually - in the example bellow #__rbid_cats_states
(The category will have a structure of primary key, category_id, state_id )

Add  this above the watchlist processing in the foreach (   foreach($rows as $i => $row){ )
// it should be on line 55 - 56
                // get the states of the categories to send mails
      $query = "select state_field from #__rbid_cats_states a where catid=$row->cat ";
      $database->setQuery($query);
      $states = $database->loadResultArray();
      $states_string = implode(',',$states);
                // get the users of the states selected
      $query = "select a.userid from #__rbid_USR_PROFILE_TABLE a where state_field IN ($states_string) AND a.userid <> $row->userid ";
      $database->setQuery($query);
      $ids = $database->loadResultArray();
      $id_string = implode(',',$ids);
      
      $query = "select u.* from #__users u
              where u.id in ($id_string)";
      
      $database->setQuery($query);
      $mails = $database->loadObjectList();
      $r = new mosrBidOffers( $database );
      $r->load( $row->id );
      $r->SendMails($mails,'new_auction_watch');

      //Notify Category  Watchlist
 ...

Cheers,
Sorin

« Last Edit: April 14, 2010, 03:31:58 pm by Sorin Porumboiu » Logged

The Factory's Development Team member.
Pages: [1]
  Print  
« previous next »
 
Jump to:  

Loading...
Joomla Extension - RSS Factory Manager  Joomla Extension - EBook Factory  Joomla Extension - Briefcase Factory  Joomla Extension - Auctions Factory  Joomla Module - RSS Contextual  Joomla Module - Exchange Factory (Europe / EURO)  Joomla Module - Exchange Factory (Romania/ RON)  Joomla Custom Extensions Development   Free Joomla Extensions  Joomla Extension - RSS Factory Pro (Enhanced Version)  Joomla Virtuemart Payment Plugin - Gecad (EPayment.ro)  Joomla Module - Mosimage / Image Module  Joomla Extension - Reverse Auction Factory (Lowest Bidder Auctions)  Joomla Extension - Article Factory Manager  Joomla Module - Lavalamp Menu  Joomla Module - RSS Image Extractor  Joomla Module - Exchange Factory (Europe / EURO) for Joomla 1.0.15  Joomla Module - Exchange Factory (Romania / RON) for Joomla 1.0.15  Joomla Module - Top Movies (IMDB)   Joomla Module - EBay Latest Auctions  Auction Factory Standalone PHP script