Bitcoin Forum
May 21, 2024, 04:59:00 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 »
  Print  
Author Topic: BitShop - cryptocurrency shopping cart script [PHP/MYSQL] (v1.1.2)  (Read 74729 times)
MoreBloodWine
Legendary
*
Offline Offline

Activity: 1050
Merit: 1001


View Profile
March 23, 2014, 12:46:29 PM
 #201

However I will most likely include the ability to easily change the quantity and total price of transactions in the next release of BitShop.
Sounds good but I'm still stumped as to why the direct DB change doesn't seem to do anything to the order, like I said before. Best I can tell it has to be the uniqueness of the URL in some way.

To be decided...
MoreBloodWine
Legendary
*
Offline Offline

Activity: 1050
Merit: 1001


View Profile
March 24, 2014, 02:28:01 AM
 #202

I can't seem to find it if it exists, but does anyone know if the goxgrab uses coinbase at all, I know it's got bitstamp, btce etc but I can't seem to be able to figure out if coinbase is an option.

Ty.

To be decided...
bitfreak! (OP)
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
March 24, 2014, 03:05:45 AM
 #203

I can't seem to find it if it exists, but does anyone know if the goxgrab uses coinbase at all, I know it's got bitstamp, btce etc but I can't seem to be able to figure out if coinbase is an option.

Ty.
It uses the bitcoincharts API to fetch market data. But they don't appear to support coinbase.

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
MoreBloodWine
Legendary
*
Offline Offline

Activity: 1050
Merit: 1001


View Profile
March 24, 2014, 03:33:28 AM
 #204

I can't seem to find it if it exists, but does anyone know if the goxgrab uses coinbase at all, I know it's got bitstamp, btce etc but I can't seem to be able to figure out if coinbase is an option.

Ty.
It uses the bitcoincharts API to fetch market data. But they don't appear to support coinbase.
Well that sucks, how would I go about requesting Coinbase be included ?

To be decided...
exues
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
April 10, 2014, 05:18:35 PM
 #205

/sci/process-order.php?pid=1&sid=querr59sqefttm9ujdipt3ouf0

An unexpected error occurred. Please go back and try again.


bitfreak! (OP)
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
April 10, 2014, 05:39:14 PM
 #206

/sci/process-order.php?pid=1&sid=querr59sqefttm9ujdipt3ouf0

An unexpected error occurred. Please go back and try again.
Strange. Is that error happening every time or only that one time?

Try replacing line 62 of the sci/process-order.php file with the following line:

$test_price = bitsci::btc_num_format($file['FilePrice'] / $_SESSION['conv_rate']);

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
exues
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
April 10, 2014, 07:07:02 PM
 #207

The problem

http://127.0.0.1/sci/payment.php?t=zCubELWaTSpZHDrutArq7QuAo6&c=btc

Warning: file_get_contents(t_data/be53ba8e8509103b1dd0673e97c9b6fe7dc6602e7b8ba5f81b723911bf313062): failed to open stream: No such file or directory in /var/www/html/sci/payment.php on line 90 ERROR: no transactions linked to the current transaction code!


t_data   Don't create a new document, t_data (777)

Unable to display the payment page,

my  CENTOS 6.5
       PHP 5.3.3
       mysql  5.1.73
       phpmyadmin 3.5.7
       Apache/2.2.15
       Zend Engine v2.3.0







bitfreak! (OP)
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
April 11, 2014, 06:26:26 AM
 #208

So the permissions on your t_data folder are set to 777? I remember someone else experienced a similar problem, the script thought their IP address was changing even though it wasn't. Try the following fix... replace the entire get_ip_hash() function in the security.lib.php file with the following function:

function get_ip_hash() {
  if (!empty($_SERVER['REMOTE_ADDR'])) {
    return hash('sha256', $_SERVER['REMOTE_ADDR']);
  } else {
    return false;
  }
}

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
MoreBloodWine
Legendary
*
Offline Offline

Activity: 1050
Merit: 1001


View Profile
April 26, 2014, 07:26:51 AM
Last edit: April 26, 2014, 09:01:46 AM by MoreBloodWine
 #209

I asked before, never really got an answer. Ben trying to do it on my own but all I keep doing is breaking the damn thing, can you PLEASE help me out here bitfreak ?

No matter how I edit it even when borrowing code from the category block or w/e it is it doesn't seem to work.

What I am trying to achieve is the same look seen when viewing the categories tab.

Cat 1 (count)
Cat 2 (4)

So on and so forth... so can you please help me out here ?

I copied below what should be all of the code to modify.

Ty.

side.inc.php
Code:
            <?php
            
} else {

              echo 
'<li class="nav-header">Categories</li>';
              if (empty(
$cat_id)) {
                
$cat_id = (($page == 'cats') && !empty($_GET['id'])) ? $_GET['id'] : 0;
              }
  
  $root_id $cat_id;
  if (($cat_id 0) && (($page == 'item') || ($page == 'cats'))) {
    $curr_cat get_cat(safe_sql_str($cat_id));
    if (!empty($curr_cat) && ($curr_cat != 'N/A')) {
      $curr_cat mysql_fetch_assoc($curr_cat);
  if ($curr_cat['Parent'] > 0) {
    $root_id $curr_cat['Parent'];
  }
    }
  }
  
  if (!empty($categories) && ($categories != 'N/A')) {
   mysql_data_seek($categories0);
                while (
$category mysql_fetch_assoc($categories)) {
  if ($category['Active']) {
                    
$c_active = ($root_id == $category['CatID']) ? ' class="active"' '' ;
$img_html = (empty($category['Image'])) ? '' "<img src='".$category['Image']."' alt='' width='20' height='20' />";
                    echo 
"<li$c_active><a href='index.php?page=cats&amp;id=".$category['CatID'].
"'>".$img_html.' '.safe_str($category['Name'])."</a></li>";
  }
                }
  }
}
?>


Edit: Also, how can I use more than 5 images / thumbnails per item and have them break after 4 on item view since the 5th gets squished due to set frame size in the code ?

To be decided...
bitfreak! (OP)
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
April 27, 2014, 05:25:06 AM
 #210

Replace this line:

                    echo "<li$c_active><a href='index.php?page=cats&amp;id=".$category['CatID'].
               "'>".$img_html.' '.safe_str($category['Name'])."</a></li>";

With these lines:

               $catc_count = count_file_cat(safe_sql_str($category['CatID']));
                    echo "<li$c_active><a href='index.php?page=cats&amp;id=".$category['CatID'].
               "'>".$img_html.' '.safe_str($category['Name'])." ($catc_count)</a></li>";

Quote
Also, how can I use more than 5 images / thumbnails per item and have them break after 4 on item view since the 5th gets squished due to set frame size in the code ?
I'll look into it.

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
MoreBloodWine
Legendary
*
Offline Offline

Activity: 1050
Merit: 1001


View Profile
April 27, 2014, 05:40:52 AM
 #211

Replace this line:

                    echo "<li$c_active><a href='index.php?page=cats&amp;id=".$category['CatID'].
               "'>".$img_html.' '.safe_str($category['Name'])."</a></li>";

With these lines:

               $catc_count = count_file_cat(safe_sql_str($category['CatID']));
                    echo "<li$c_active><a href='index.php?page=cats&amp;id=".$category['CatID'].
               "'>".$img_html.' '.safe_str($category['Name'])." ($catc_count)</a></li>";

Quote
Also, how can I use more than 5 images / thumbnails per item and have them break after 4 on item view since the 5th gets squished due to set frame size in the code ?
I'll look into it.
Thx for that, in regards to the code. Parents show 0 totals even when there's children with items.

To be decided...
bitfreak! (OP)
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
April 27, 2014, 08:59:37 AM
Last edit: April 27, 2014, 04:28:03 PM by bitfreak!
 #212

Oh sorry, replace the lines you changed before with the following lines of code:

[removed]

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
MoreBloodWine
Legendary
*
Offline Offline

Activity: 1050
Merit: 1001


View Profile
April 27, 2014, 09:07:29 AM
 #213

I musta missed something but I don't see how cause I backed out the previous lines... all I get now are all 0's.

Here's the entire code from side.inc.php
Code:
<div class="span3">
        <div class="well" id="side_nav">
          <ul class="nav nav-list" style="padding:8px 0;">
 
            <?php
            
if (!empty($a_action) && ($a_action == 'valid')) {
?>

            <li class="nav-header">Navigation</li>
<li <?php if (empty($page) || $page == 'home') { echo "class='active'"; } ?>><a href='admin.php?page=home'>Home</a></li>
            <li <?php if ($page == 'orders' || $page == 'editcodes') { echo "class='active'"; } ?>><a href='admin.php?page=orders'>Orders</a></li>
            <li <?php if ($page == 'items' || $page == 'editimages' || $page == 'edititem' || $page == 'newitem') { echo "class='active'"; } ?>><a href='admin.php?page=items'>Products</a></li>
            <li <?php if ($page == 'editcats') { echo "class='active'"; } ?>><a href='admin.php?page=editcats'>Categories</a></li>
            <li <?php if ($page == 'reviews') { echo "class='active'"; } ?>><a href='admin.php?page=reviews'>Reviews</a></li>
            <li <?php if ($page == 'settings' || $page == 'pages' || $page == 'blocks') { echo "class='active'"; } ?>><a href='admin.php?page=settings'>Settings</a></li>
            <li <?php if ($page == 'logout') { echo "class='active'"; } ?>><a href='admin.php?page=logout'>Log Out</a></li>

            <?php
            
} else {

              echo 
'<li class="nav-header">Categories</li>';
              if (empty(
$cat_id)) {
                
$cat_id = (($page == 'cats') && !empty($_GET['id'])) ? $_GET['id'] : 0;
              }
  
  $root_id $cat_id;
  if (($cat_id 0) && (($page == 'item') || ($page == 'cats'))) {
    $curr_cat get_cat(safe_sql_str($cat_id));
    if (!empty($curr_cat) && ($curr_cat != 'N/A')) {
      $curr_cat mysql_fetch_assoc($curr_cat);
  if ($curr_cat['Parent'] > 0) {
    $root_id $curr_cat['Parent'];
  }
    }
  }
  
  if (!empty($categories) && ($categories != 'N/A')) {
   mysql_data_seek($categories0);
                while (
$category mysql_fetch_assoc($categories)) {
  if ($category['Active']) {
                    
$c_active = ($root_id == $category['CatID']) ? ' class="active"' '' ;
$img_html = (empty($category['Image'])) ? '' "<img src='".$category['Image']."' alt='' width='20' height='20' />";
                    
$catc_count count_file_cat(safe_sql_str($category['CatID']));
$sub_cats get_scats($category['CatID']);
$subc_total 0;
$total_cats 0;

if (!empty($sub_cats) && ($sub_cats != 'N/A')) {   
  while ($row mysqli_fetch_assoc($sub_cats)) {
if ($row['Active']) {
  $subc_total += count_file_cat(safe_sql_str($row['CatID']));
}
  }
  $total_cats $subc_total $catc_count;
}

                    echo 
"<li$c_active><a href='index.php?page=cats&amp;id=".$category['CatID'].
               
"'>".$img_html.' '.safe_str($category['Name'])." ($total_cats)</a></li>";
  }
                }
  }
}
?>

          </ul>
        </div>
<?php
if (empty($a_action)) {
  if ($best_prods) { require(dirname(__FILE__).'/bestfiles.inc.php'); }
  if ($top_prods) { require(dirname(__FILE__).'/topfiles.inc.php'); }
}
?>

      </div>

To be decided...
bitfreak! (OP)
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
April 27, 2014, 09:23:21 AM
 #214

Sorry I was using mysqli code from a newer version of BitShop.

Change 'mysqli_fetch_assoc' to 'mysql_fetch_assoc'.

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
MoreBloodWine
Legendary
*
Offline Offline

Activity: 1050
Merit: 1001


View Profile
April 27, 2014, 09:26:16 AM
 #215

Sorry I was using mysqli code from a newer version of BitShop.

Change 'mysqli_fetch_assoc' to 'mysql_fetch_assoc'.
Now everything but the cat with childs holding items is 0 if that makes sense lol

To be decided...
bitfreak! (OP)
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
April 27, 2014, 09:36:34 AM
Last edit: April 27, 2014, 04:26:31 PM by bitfreak!
 #216

Lol ok... replace that last changed code with this code:
Code:
					$total_cats = count_file_cat(safe_sql_str($category['CatID']));
$sub_cats = get_scats($category['CatID']);

if (!empty($sub_cats) && ($sub_cats != 'N/A')) {  
 while ($row = mysql_fetch_assoc($sub_cats)) {
if ($row['Active']) {
 $total_cats += count_file_cat(safe_sql_str($row['CatID']));
}
 }
}

                    echo "<li$c_active><a href='index.php?page=cats&amp;id=".$category['CatID'].
               "'>".$img_html.' '.safe_str($category['Name'])." ($total_cats)</a></li>";

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
MoreBloodWine
Legendary
*
Offline Offline

Activity: 1050
Merit: 1001


View Profile
April 27, 2014, 09:37:49 AM
 #217

Edit: Trying patch now...

-------

Here's an image showing what I mentioned in my last reply and a question about a previous comment that I don't recall if you ever noticed.

When using a large image for an icon, it shows nice as seen in image 2 but it image one (shows previous issue as well) you'll notice the images aren't resized like they are on the main sections of the site. Can you patch this in the next release please and maybe tell me how to patch it now since the large images are mind boggling when using that page, Ty.




To be decided...
bitfreak! (OP)
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
April 27, 2014, 09:43:37 AM
Last edit: April 27, 2014, 04:24:53 PM by bitfreak!
 #218

Quote
When using a large image for an icon, it shows nice as seen in image 2 but it image one (shows previous issue as well) you'll notice the images aren't resized like they are on the main sections of the site.
You shouldn't be using large images for the icons in the first place. You should be using images which have been resized to the size of an icon (eg 20x20 pixels) to make the website load faster.

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
MoreBloodWine
Legendary
*
Offline Offline

Activity: 1050
Merit: 1001


View Profile
April 27, 2014, 09:46:17 AM
 #219

Patch worked, Ty.

Now I guess it's just the cat image thing ;-)

Site seems to load ok and they're just images I grabbed from the net... for the sake of argument though. What would the "patch" be or this problem ?

To be decided...
bitfreak! (OP)
Legendary
*
Offline Offline

Activity: 1536
Merit: 1000


electronic [r]evolution


View Profile WWW
April 27, 2014, 09:50:06 AM
 #220

for the sake of argument though. What would the "patch" be or this problem ?
The patch would be to resize the images using MS Paint or what ever image editing software you usually use. You could just apply height and width styling to shrink the image in real time but I would highly recommend against it.

XCN: CYsvPpb2YuyAib5ay9GJXU8j3nwohbttTz | BTC: 18MWPVJA9mFLPFT3zht5twuNQmZBDzHoWF
Cryptonite - 1st mini-blockchain altcoin | BitShop - digital shop script
Web Developer - PHP, SQL, JS, AJAX, JSON, XML, RSS, HTML, CSS
Pages: « 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!