Pages:
Author

Topic: BitShop - cryptocurrency shopping cart script [PHP/MYSQL] (v1.1.2) - page 27. (Read 74795 times)

legendary
Activity: 1050
Merit: 1001
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:

       

         
       

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

     
legendary
Activity: 1536
Merit: 1000
electronic [r]evolution
Oh sorry, replace the lines you changed before with the following lines of code:

[removed]
legendary
Activity: 1050
Merit: 1001
Replace this line:

                    echo "               "'>".$img_html.' '.safe_str($category['Name'])."";

With these lines:

               $catc_count = count_file_cat(safe_sql_str($category['CatID']));
                    echo "               "'>".$img_html.' '.safe_str($category['Name'])." ($catc_count)";

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.
legendary
Activity: 1536
Merit: 1000
electronic [r]evolution
Replace this line:

                    echo "               "'>".$img_html.' '.safe_str($category['Name'])."";

With these lines:

               $catc_count = count_file_cat(safe_sql_str($category['CatID']));
                    echo "               "'>".$img_html.' '.safe_str($category['Name'])." ($catc_count)";

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.
legendary
Activity: 1050
Merit: 1001
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:
                        } else {

              echo 
'Categories';
              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'])) ? '' ".$category['Image']."' alt='' width='20' height='20' />";
                    echo 
"$c_active>].
"'>".$img_html.' '.safe_str($category['Name'])."
"
;
  }
                }
  }
}
?>


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 ?
legendary
Activity: 1536
Merit: 1000
electronic [r]evolution
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;
  }
}
newbie
Activity: 2
Merit: 0
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







legendary
Activity: 1536
Merit: 1000
electronic [r]evolution
/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']);
newbie
Activity: 2
Merit: 0
/sci/process-order.php?pid=1&sid=querr59sqefttm9ujdipt3ouf0

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


legendary
Activity: 1050
Merit: 1001
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 ?
legendary
Activity: 1536
Merit: 1000
electronic [r]evolution
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.
legendary
Activity: 1050
Merit: 1001
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.
legendary
Activity: 1050
Merit: 1001
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.
legendary
Activity: 1536
Merit: 1000
electronic [r]evolution
I did notice one thing weird, say you start with 19, 1 sells stocks now 18. You change it to 2, the stock doesn't drop to 17 but when the sales cancelled the stock pops to 20.
That's because when you manually change the quantity of the order from 1 to 2 is doesn't do anything to lower the stock to 17. But when you cancel the order it adds the new quantity of 2 to back onto the 18 stock, leaving you with 20. If I created a user friendly option for changing the transaction quantity it would automatically lower the stock back to 17 to account for the change, but I didn't see why such an option would really be needed so I didn't include it. However I will most likely include the ability to easily change the quantity and total price of transactions in the next release of BitShop.
legendary
Activity: 1536
Merit: 1000
electronic [r]evolution
Edit: Changing quantity doesn't even seem to affect stock levels.
Why would changing the quantity of an order directly in the database change the stock levels? Changing anything about a single transaction is not going to affect anything about the product linked to the transaction, including the stock number. If you manually change the quantity of a transaction in the database then you're going to have to edit the stock number of the item manually.
legendary
Activity: 1050
Merit: 1001
I did notice one thing weird, say you start with 19, 1 sells stocks now 18. You change it to 2, the stock doesn't drop to 17 but when the sales cancelled the stock pops to 20.
legendary
Activity: 1050
Merit: 1001
Could it have something to do with the uniqueness of the URL ?
Possibly, but refreshing the page should have caused it to update. But you can try adding something like &junk to the end of the URL to see if it makes a difference.
&junk does nothing nor does ctrl+f5 to force full refresh.

As far as I can tell, it has to be the URL.

I mean even if modifying orders isn't something you implement it is something I'd like to be able to do via the DB.

Edit: Changing quantity doesn't even seem to affect stock levels.
legendary
Activity: 1536
Merit: 1000
electronic [r]evolution
Could it have something to do with the uniqueness of the URL ?
Possibly, but refreshing the page should have caused it to update. But you can try adding something like &junk to the end of the URL to see if it makes a difference.
legendary
Activity: 1050
Merit: 1001
Ex.

You buy 1 apple at 0.01, the order payment page reflects this.

I go into the DB and change it to 2 at 0.02, I save it, go back to the payment page and refresh but the original 1 @ 0.01 still shows.
Like I said, it should be working. The only explanation I can think of is that you're not editing the correct transaction or your changes aren't being saved into the database for some reason. I can't think of any other reasons why it wouldn't work.
Thats just it though, I edited the ONLY transaction with my email in it... and the changes are being saved because I can close the DB tab, go back on a new tab and see said edits. Could it have something to do with the uniqueness of the URL ?


Edit: I'll try it again or shits n giggles as the saying goes.
legendary
Activity: 1536
Merit: 1000
electronic [r]evolution
Ex.

You buy 1 apple at 0.01, the order payment page reflects this.

I go into the DB and change it to 2 at 0.02, I save it, go back to the payment page and refresh but the original 1 @ 0.01 still shows.
Like I said, it should be working. The only explanation I can think of is that you're not editing the correct transaction or your changes aren't being saved into the database for some reason. I can't think of any other reasons why it wouldn't work.
Pages:
Jump to: