Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ragatep

Archived
  • Posts

    6
  • Joined

  • Last visited

Profile Information

ragatep's Achievements

  1. line 27 of \admin\faq.php: $sort_order = (int)$HTTP_POST_VARS['sort_order']; echo $sort_order .'<br>'; comment out: echo $sort_order .'<br>'; $sort_order = (int)$HTTP_POST_VARS['sort_order']; // echo $sort_order .'<br>'; should work
  2. Hello All, I am having a weird problem with psigate charging the wrong amount when a customer is using a coupon. The module Credit Class & Gift Voucher is installed and the checkout confirmation and the admin/orders.php show the discount correctly: Sub-Total: $15.00 Shipping & Handling: $15.00 Discount Coupons:discount: $5.00 Total: $25.00 But when I am in the psigate backend which shows the transaction (https://secure.psigate.com/Store_Reports/view_order_details) the amount that is charged to the customer is $30.00 and not $25.00. Can anyone assist me with this problem as I looked in class.psigate_xml.php and I really dont want to play with this since I am not 100% sure how everything works. I have quite extensive knowledge of OS Commerce and php so if you can point me in the right direction maybe i can figure it out. Thanks in advance for the help.... Rod
  3. Hello, I am having a problem with the download controller not adding taxes to items on the confirmation checkout page when you are purchasing a downloadable item. Here is the section withing confirmation_checkout.php where the taxes are supposed to get shown: <?php // here is where all the info is for cart if (sizeof($order->info['tax_groups']) > 1) { ?> <tr> <td class="main" colspan="2"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> <td class="smallText" align="right"><b><?php echo HEADING_TAX; ?></b></td> <td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td> </tr> <?php } else { ?> <tr> <td class="main" colspan="3"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> </tr> <?php } for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { echo ' <tr>' . "\n" . ' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="main" valign="top">' . $order->products[$i]['name']; if (STOCK_CHECK == 'true') { echo tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']); } if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>'; } } echo '</td>' . "\n"; if (sizeof($order->info['tax_groups']) > 1) echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n"; echo ' <td class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" . ' </tr>' . "\n"; } ?> I figure it is because the download controller bypasses delivery confirmation page and the taxes depends on the address information from this page. Oh yes, I figure it is the address information becuase when I add a product with the downloadable item, the taxes are shown. But I could be talking out of my A** again. I am not 100% sure how the taxes get applied and shown on this page. I took a look at the functions/general.php and includes/classes/order.php but couldnt find a solution. Can someone please help. I need to get this done ASAP. To test: 1. Create a profile, you will need to set the location as winnipeg, manitoba, canada. 2. add a plan and do purchase/checkout all the way to confirmation page. All plans are taxable. 3. No taxes are shown 4. Now click on products tab, add a product with the plan 5. do purchase/checkout all the way to confirmation page. Taxes will be shown. Thanks in advance Rod edit: removed link at poster's request
  4. I don't know if this can help you but here is what I found: the reason that this error happens is becuase of this "if" statement (in catalog/includes/modules/phpbb2/includes/sessions.php) right here: if ( !$db->sql_query($sql) || !$db->sql_affectedrows() ) for some reason the update query works fine if you are logged on but "!$db->sql_affectedrows()" doesn't think that you updated anything. so what i did to fix this is: changed the original code: (approx line 73 to line 82) of if ( !$db->sql_query($sql) || !$db->sql_affectedrows() ) { $sql = "INSERT INTO " . SESSIONS_TABLE . " (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in) VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $thispage_id, $login)"; if ( !$db->sql_query($sql) ) { message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql); } } to this new code: if ( !$db->sql_query($sql) || !$db->sql_affectedrows() ) { $sql = "INSERT INTO " . SESSIONS_TABLE . " (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in) VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $thispage_id, $login)"; if ( !$db->sql_query($sql) ) { // delete session that is the same $sql = "DELETE FROM phpbb_sessions WHERE session_id = \"$session_id\""; $db->sql_query($sql); $sql = "INSERT INTO " . SESSIONS_TABLE . " (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in) VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $thispage_id, $login)"; if ( !$db->sql_query($sql) ) { message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql); } } } what this does is check to see if there is a session that exists in the phpbb_sessions table. if so then it deletes it from this table. Then it tries to do the insert again. If you get another insert problem you get the critical error. If not then we are fine. Though there is a 1 in 6.3340286662973277706162286946812e+49 chance that the session id may be recreated again while someone is logged in at that same time I assume it will boot the other person off becuase it deletes their session (but since I am a gambler I am willing to take that chance). In the off chance that this does happen I am assuming since the session table contains the session_user_id number this should reduce any risk of anything else funny happening. Finally if someone does encounter something weird while they are using the bbs (that is they are getting kicked off becuase of their session id) and they actually do contact the webmaster. just tell them to clear their cookies and a new session id will be created when they log in. I have worked with oscommerce for a while now but have not worked with phpbb. So if there are any flaws with my programming or any comments, please feel free to post a reply so I can fix my code. Anyway I hope this helps all those who use this contribution.
×
×
  • Create New...