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
  #32  
Old 02-02-2003, 05:56 PM
BaBa2002 BaBa2002 is offline
 
Join Date: Nov 2001
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

got a question
is it possible when users buy the item the they get a link to download instead of a email.
Reply With Quote
  #33  
Old 02-03-2003, 02:57 AM
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 question
is it possible when users buy the item the they get a link to download instead of a email.
You could do this -- It would require 2 templates per downloadable item and some code modifications. I can get that to you if you really want it...

The only "danger" I can see is that the download link would not be secure -- so once it's bought, the user could share it with someone else....

It might be better to just strip out all of the shipping info stuff from the templates and from the code and then email them a unique download link....
Reply With Quote
  #34  
Old 02-03-2003, 09:26 AM
BaBa2002 BaBa2002 is offline
 
Join Date: Nov 2001
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok thx bud
and what about a page that creat a random password and protect the directory of the file or is that to much work?

ps i'm a newbi to php
Reply With Quote
  #35  
Old 02-03-2003, 01:14 PM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Believe it or not, I'm a newbi too . I'm sure there's a way you could do it. Maybe when I have a few more months of programming under my belt I can write something like that....
Reply With Quote
  #36  
Old 02-09-2003, 03:32 PM
ethics ethics is offline
 
Join Date: Feb 2002
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Church. First of all, thanks again for doing this.

Question: I've installed the hack, added an item and tried testing it out. When I hit submit my order on top it said, "Could not send email" but it did send it and I got it in my email box with all of the pertinent information.
Reply With Quote
  #37  
Old 02-11-2003, 02:09 PM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Strange... Double-check this line of code in the store chunk:

PHP Code:
mail$to$subject$message,"From: $bbuserinfo[email]") or print "Could NOT send mail"
and this one

PHP Code:
mail$to$subject$message,"From: [email]youremail@yourdomain.com[/email]") or print "Could NOT send mail"
If everything looks okay and you still get the message, just delete (in both lines):

Code:
or print "Could NOT send mail"
So, it would look like this:

PHP Code:
mail$to$subject$message,"From: [email]youremail@yourdomain.com[/email]"); 
That will get rid of the message. Good luck!
Reply With Quote
  #38  
Old 02-11-2003, 10:40 PM
ethics ethics is offline
 
Join Date: Feb 2002
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much, sir.
Reply With Quote
  #39  
Old 02-13-2003, 02:33 PM
ethics ethics is offline
 
Join Date: Feb 2002
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another question if I may.

Say I set quantity of 3. Anyway I can make the code say something like, you can't buy anymore once the quantity == to sold#?
Reply With Quote
  #40  
Old 02-13-2003, 02:43 PM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's a good idea and should be pretty simple. You would need to run a query to find out how many have been sold and then use an "if" statement. Unfortunately, I'm really swamped right now and wouldn't be able to code it for a couple of weeks. I'm actually a little new to PHP, otherwise I bet I could bang it out in a few minutes. If anyone else sees this request, feel free to give us some code. It would have to be hard-coded in the product action sections, otherwise a new field would have to be added and some admin modifications...

If no one comes up with something I'll get to it ASAP. Good luck
Reply With Quote
  #41  
Old 02-13-2003, 07:07 PM
ethics ethics is offline
 
Join Date: Feb 2002
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sounds great. I wish I was a decent programmer. Unfortunately, I have a mental block (although I think I would have been very good at this).
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 08:45 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07098 seconds
  • Memory Usage 2,316KB
  • 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
  • (1)bbcode_code
  • (3)bbcode_php
  • (1)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