Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Add Product Actions to Lesane's Store Hack! Details »»
Add Product Actions to Lesane's Store Hack!
Version: 1.00, by ChurchMedia ChurchMedia is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-30-2003 Last Update: Never Installs: 24
 
No support by the author.

Physical Product Hack for Lesane's Store Hack
by ChurchMedia
---------------------------------------------------------
NOTE: This hack has not been updated for the latest version of the Store Hack for VB2. I'll write a new hack if and when there is a VB3 version of the Store Hack
---------------------------------------------------------

What this hack is for:

If you want to sell actual products in your community store, such as books, videos, coffee mugs... whatever. I suggest adding products that promote your site. You can get all sorts of customized merchandise from Cafe Press.

Before you ask, this is not a shopping cart to sell things with real money. It's to redeem points for tangible products. If you don't like the idea of giving stuff away for posting, this isn't the hack for you.

---------------------------------------------------------

How this hack works/what it does (after initial setup):

1) You add a new action to the database from your admin cp
2) You modify 2 small parts of a code chunk and add it to your store.php
3) When a user purchases an item, they enter their address, etc.
4) You will receive an email with the product info and shipping info
5) The user receives a "receipt" by email as well

---------------------------------------------------------
INSTRUCTIONS:

1) Follow the instructions in:

initial_hack_instructions.txt

You only have to do this once!

---------------------------------------------------------

2) For new actions, follow the instructions in

add_action_instructions.txt

You have to follow these instructions for each new action/product you add, so keep them handy!

---------------------------------------------------------

Modifications:

1 Initial Modification to store.php
1 Modification to index.php in admin

Templates:
2 new templates are added

Screenshots are included in the zip file.

Enjoy!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 01-31-2003, 04:54 PM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just another thought -- if you aren't thrilled with the idea of giving away product for posting, consider adding products that promote your site. Like mousepads, shirts, mugs, etc. with your logo. You can get all sorts of merchandise from Cafe Press.
Reply With Quote
  #23  
Old 01-31-2003, 05:48 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ChurchMedia
It's really only desinged for redeeming points for product. Like I said, it's kind of a marketing mechanism for my real oline store. I use Miva Merchant with a MySql mod for the database. I've also tried X-Cart, which is an excellent and affordable php-based shopping cart.

Lesane's original store hack was desinged to sell "forum enhancements" redeemable by points. This is just a modification for real product. If you want an actual cart and have people pay real money, check out the carts I mentioned. Also, keep in mind that I am in the "information business", so the more people post to my site, the better. I don't mind paying for a few items to make that happen .
Ouch at the $$$

But still is there any chance you could do something like i mentionned. People are always asking for a proper store for their vbulletin's with intigrated log-in's etc.

Any chance of you doing it ?

I'm sure if you got stuck with anything one of our expert hackers could help you too

Kindest Regards

- miSt
Reply With Quote
  #24  
Old 01-31-2003, 07:37 PM
bitbender's Avatar
bitbender bitbender is offline
 
Join Date: Jan 2002
Location: Sorta near Dallas, Texas
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me clicks install
Reply With Quote
  #25  
Old 02-02-2003, 07:20 AM
ghroob ghroob is offline
 
Join Date: Dec 2001
Location: Moscow
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello

sorry i didn't find store.php file in your attachment ..

Thanx
Reply With Quote
  #26  
Old 02-02-2003, 08:34 AM
JHSoundZ's Avatar
JHSoundZ JHSoundZ is offline
 
Join Date: Sep 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ghroob
Hello

sorry i didn't find store.php file in your attachment ..

Thanx
Thats because its a addon to lesanes store hack.

https://vborg.vbsupport.ru/showthrea...threadid=36991

you need that hack added before you can add this
Reply With Quote
  #27  
Old 02-02-2003, 09:32 AM
BaBa2002 BaBa2002 is offline
 
Join Date: Nov 2001
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

got a litle problem
you said in your instruction page
Quote:
4) In "store.php"

>>>>>>>>>>>FIND

?>

>>>>>>>>>>>ADD BEFORE

The store_code_chunk.txt contents
when i do thet i get a parse error in my store.php


what's my problem?
Reply With Quote
  #28  
Old 02-02-2003, 02:00 PM
ethics ethics is offline
 
Join Date: Feb 2002
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ChurchMedia, THANK you!!!

Will install this as soon as possible. I have magazine subscriptions I give away but this will automate this a lot!!! Thanks!
Reply With Quote
  #29  
Old 02-02-2003, 03:12 PM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by BaBa2002
got a litle problem
you said in your instruction page
when i do thet i get a parse error in my store.php

what's my problem?
Make sure you downloaded the zip in the first post. I had posted (and then deleted) a variation that would only send email info. If you downloaded that, don't use it.

The code chunk for the store is:

PHP Code:
// ###################### Start Physical Item Hack by ChurchMedia #######################
if ($action=="buyitem") {

  
$storeitem $DB_site->query_first("SELECT * FROM store WHERE action='$storeaction'");
  
$storeid=$storeitem[id];
  
$cost=$storeitem[costs];
  
$title=$storeitem[title];
  
$need=$points $cost;


$userstuff $DB_site->query_first("SELECT userid,username,storep,email FROM user WHERE userid=$bbuserinfo[userid]");

$points=$userstuff[storep];
if (
$cost>$points) {
eval(
"standarderror(\"".gettemplate('store_error')."\");");
} else {

// ##################### Begin Email To Admin ############################

$to "youremail@yourdomain.com"//The e-mail address to send the mail to
$subject "Community Order: $title"
$message "
A purchase in the community store has been made!

Item Purchased: 
$title

User Name: 
$bbuserinfo[username]
User Email: 
$bbuserinfo[email]

Ship To:
$name
$company
$useraddress
$city$state $zip
$country

Phone: 
$phone";

mail$to$subject$message,"From: $bbuserinfo[email]") or print "Could NOT send mail";

// ##################### Begin Email To User ############################

$to "$bbuserinfo[email]"//The e-mail address to send the mail to
$subject "Community Order: $title"//Subject name shown on e-mail
$message "Dear $bbuserinfo[username],

Thanks for your purchase from our community store!

-------------------------------------------------------
Item purchased: 
$title

It will be shipped to:
$name
$company
$useraddress
$city$state $zip
$country
-------------------------------------------------------
    
If you have any questions, please reply to this email."
;

mail$to$subject$message,"From: [email]youremail@yourdomain.com[/email]") or print "Could NOT send mail";


// ##################### End Email ############################

 
$DB_site->query("UPDATE user SET storep=storep-$cost WHERE userid='$bbuserinfo[userid]'");
$changestorenow $DB_site->query("UPDATE store SET sold=sold+1 WHERE action='$storeaction'");

$moneycheck $DB_site->query_first("SELECT storep,userid FROM user WHERE userid='$bbuserinfo[userid]'");
$money $moneycheck[storep];

eval(
"dooutput(\"".gettemplate("store_item_bought")."\");");
}
}

// ##################### End Physical Item Hack by ChurchMedia ############################ 
If you're still having problems, PM me and we'll arrange for you to send me your store.php file and I'll take a look
Reply With Quote
  #30  
Old 02-02-2003, 03:26 PM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did find one small error in the code. It does not cause an error, but it doesn't update your items sold. I fixed it in the zip file, but if you alrady downloaded it, in store.php, find

PHP Code:
$changestorenow $DB_site->query("UPDATE store SET sold=sold+1 WHERE action='kick'"); 
and replace with

PHP Code:
$changestorenow $DB_site->query("UPDATE store SET sold=sold+1 WHERE action='$storeaction'"); 
This will correctly update how many of that product has been sold.
Reply With Quote
  #31  
Old 02-02-2003, 05:55 PM
BaBa2002 BaBa2002 is offline
 
Join Date: Nov 2001
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool thx churchmedia
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:32 PM.


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.11809 seconds
  • Memory Usage 2,340KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete