vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Mysql Add user to Paid Subscription (https://vborg.vbsupport.ru/showthread.php?t=220137)

datarecall 08-04-2009 01:20 AM

Mysql Add user to Paid Subscription
 
I have a store and if someone purchases from my store I want to add them to the paid subscriptions usergroup for x amount of days I found the subscription log and tried inserting the information into there however that did not update their account.

To go in manually takes way to long so I was looking for a way to streamline this. is there a table I am missing or a vbulletin script that can help with this ?

$insert_array = array('subscriptionid' => 1,
'userid' => 128003,
'pusergroupid' => 52,
'status' => 1,
'regdate' => strtotime('now'),
'expirydate' => strtotime('+2 months'));
$sql2->insert($insert_array,'subscriptionlog');

any help is appreciated.

Dismounted 08-04-2009 06:21 AM

Have you look at the files which actually process a subscription? If you haven't - this is a good place to start.

Marco van Herwaarden 08-04-2009 07:46 AM

Better to use the DataManagers so you don't need to think about the underlying structure.

datarecall 08-04-2009 05:43 PM

I looked at the files that process the requests when you are adding a user but I could find no insert or updates taking place.

What do you mean by data managers ?

Marco van Herwaarden 08-05-2009 07:32 AM

Datamanagers: Objects as Data and Methods

datarecall 08-06-2009 12:30 AM

I looked through the subscription code but do not see any data managers in use I dont see any inserts or usergroup updates taking place.

Dismounted 08-06-2009 06:19 AM

Paid Subscriptions actually doesn't use a Data Manager per se. Have a look at class_paid_subscription.php.


All times are GMT. The time now is 11:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01022 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete