vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Add Product Actions to Lesane's Store Hack! (https://vborg.vbsupport.ru/showthread.php?t=48338)

ChurchMedia 01-31-2003 04:54 PM

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.

Dean C 01-31-2003 05:48 PM

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

bitbender 01-31-2003 07:37 PM

/me clicks install

ghroob 02-02-2003 07:20 AM

Hello

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

Thanx:)

JHSoundZ 02-02-2003 08:34 AM

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

BaBa2002 02-02-2003 09:32 AM

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?

ethics 02-02-2003 02:00 PM

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!

ChurchMedia 02-02-2003 03:12 PM

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 :)

ChurchMedia 02-02-2003 03:26 PM

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.

BaBa2002 02-02-2003 05:55 PM

cool thx churchmedia


All times are GMT. The time now is 07:17 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.01154 seconds
  • Memory Usage 1,771KB
  • 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
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete