Author Topic: Shop Disappeared  (Read 4934 times)

Offline dantol

Shop Disappeared
« on: March 07, 2006, 05:10:47 am »
This morning, my shop dissapeared, and I noticed there are no points counted anymore. Check it out: http://www.dantol.com/community/ - what the heck is wrong?

Offline Daniel15

Re: Shop Disappeared
« Reply #1 on: March 07, 2006, 08:32:33 am »
Hi,
 Your SMFShop installation appears to be working fine. The only problem is that the shop link has dissapeared from the menu for some weird reason.

I registered and made a test post at http://dantol.com/community/index.php?topic=4.0 , and I got $10 Credits for it (so I can safely assume that it's still counting credits)

You can access your shop by going directly to http://dantol.com/community/index.php?action=shop . I'll get the code required to put the shop button back on your forum, and reply here again.

Offline Daniel15

Re: Shop Disappeared
« Reply #2 on: March 07, 2006, 08:38:34 am »
Here you go:
Open Themes/default/Display.template.php
Find:
Code: [Select]
// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
<br />';

Replace with:
Code: [Select]
// Show how many posts they have made.
// echo '
// ', $txt[26], ': ', $message['member']['posts'], '<br />
// <br />';

            //BEGIN Shop MOD 0.2 Code
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
';

            //I couldn't find where all these $message['member'][whatever] variables
            //are set, so I just send an extra database query to get the member's
            //money. Can someone tell me where (file and line) the $message variables
            //are set?
            global $ID_MEMBER, $db_prefix;

            $result_money = db_query("SELECT money
                                      FROM {$db_prefix}members
                                      WHERE ID_MEMBER = {$message['member']['id']}
                                      LIMIT 1", __FILE__, __LINE__);
            $row_money = mysql_fetch_array($result_money, MYSQL_ASSOC);

            echo $modSettings['shopCurrencyPrefix'].$row_money['money'].$modSettings['shopCurrencySuffix']."<br><br>";
            //END SHOP MOD
           

//BEGIN SMFShop MOD 1.31 (Build 7) CODE
echo "<a href='$scripturl?action=shop;do=invother2;member={$message['member']['username']}'>View Inventory</a><br>";
//END SMFShop MOD 1.31 code

Also, Open Themes/default/index.template.php
Find:
Code: [Select]
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
Add after:
Code: [Select]
//Begin SMFShop 2.0 (Build 8) MOD code
if ($context['current_action'] == 'shop')
$current_action = 'shop';
//END SMFShop MOD code
--
Find:
Code: [Select]
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

Add After:
Code: [Select]
//Begin SMFShop 2.0 (Build 8) MOD code
//loadLanguage("shop");
echo ($current_action == 'shop' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'shop' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=shop">Shop</a>
</td>' , $current_action == 'shop' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
//END SMFShop MOD code

That should make the shop button appear again, and also show member's credit next to their posts.

Offline daniel16

Re: Shop Disappeared
« Reply #3 on: March 07, 2006, 08:48:09 am »
Is there a way you can make it so the code is more readable? Right now it is hard to read.
Hello users welcome to hell

Offline Daniel15

Re: Shop Disappeared
« Reply #4 on: March 08, 2006, 10:13:51 am »
Yeah, I just noticed that now. I'll see what I can do later, I'm a bit busy now

Offline daniel16

Re: Shop Disappeared
« Reply #5 on: March 08, 2006, 11:10:08 am »
When ever you get to it. It will make it look a lot nicer and easier to read.
Hello users welcome to hell