Jump to content

Voland

Members
  • Content count

    152
  • Joined

  • Last visited

Everything posted by Voland

  1. Voland

    NEW! Complete Order Editing Tool!

    However I tried and implemented your fix for to append the "-" before the <input> feild (I figured since you wrote it I might as well use it, and it looks good). Didin't realize you said to add above the ELSE stament, I replaced it instead. :) THings went baloney on me, and beleive it or not I fixed it myslef lol, only to realize that you said to add and not replace. Thanks a whole lot for the help Arkady
  2. Voland

    NEW! Complete Order Editing Tool!

    Got it! Installed RMA with no errors (so far). Will be testing it throughly tonight. Regarding my previouse issue. I agree, and I think since the CCGV and P/R contributions intended to store those values as positives then I shouldnt mess with it. Arkady
  3. Voland

    NEW! Complete Order Editing Tool!

    Hi, Well, I guess I came short of understanding again. I just looked at the fact that it did not add the "-" in the feilds and assumed that the solution didn't work. I never hit the Update button to see if the calculation is correct. Is that what the first solution was aimed at? If yes, then thats perfect, I mean I shouldn't care that the "-" doesn't appear in the feilds as long as the total is calculated correctly. I cannot check right now because I am in the middle of installing the RMA contribution ... which brings me to my next issue :). It is attempting to modify some code that has alredy been modified by Order Editor in admin/includes/classes/order.php as per RMA instructions it sais to FIND: $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); REPLACE WITH: $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, products_returned, products_id from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); Obviosly istead of the above original code i found: $orders_products_query = tep_db_query(" SELECT op.orders_products_id, op.products_name, op.products_model, op.products_price, op.products_tax, op.products_quantity, op.final_price, p.products_tax_class_id, p.products_weight FROM " . TABLE_ORDERS_PRODUCTS . " op LEFT JOIN " . TABLE_PRODUCTS . " p ON op.products_id = p.products_id WHERE orders_id = '" . (int)$order_id . "'"); So, should I just add products_returned, products_id after p.products_weight or what? :-" Best Regards, Arkady. PS. I havn't ran the RMA SQL file yet.
  4. Voland

    RMA Returns error for 2.2 MS2

    Hi Keith, Thank for your reply. Indeed I just realized that the second issue is due to teh fact that that is part of code from Order Editor Contribution ... silly me. Ill try to deal with that acordingly. Ill play with the first issue liek you advised. Be back soon :) Arkady
  5. Voland

    RMA Returns error for 2.2 MS2

    Hello again, I ran into another confusion while installing: in admin/includes/classes/order.php as per instructions it sais to FIND: $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); REPLACE WITH: $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, products_returned, products_id from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); I dont have exactly the same block of codein my file but I have something simillar: $orders_products_query = tep_db_query(" SELECT op.orders_products_id, op.products_name, op.products_model, op.products_price, op.products_tax, op.products_quantity, op.final_price, p.products_tax_class_id, p.products_weight FROM " . TABLE_ORDERS_PRODUCTS . " op LEFT JOIN " . TABLE_PRODUCTS . " p ON op.products_id = p.products_id WHERE orders_id = '" . (int)$order_id . "'"); Do I replace this peice of code? Or should I just add products_returned, products_id after p.products_weight BUt then what are the op. and p. "prefexes"? PLease help :) Arkady
  6. Voland

    RMA Returns error for 2.2 MS2

    HEllo again. This thread seems rather abandoned. Hopefully my next question will bring it up to speed :). I am in teh middle of installing the RMA System. And in classes/order.php where the instruction say to replace $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . tep_db_input($order_id) . "'"); with $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_returned, products_exchanged, products_exchanged_id, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . tep_db_input($order_id) . "'"); My original code has $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); the difference is (int)$order_id and tep_db_input($order_id) How important is it and what do those peices of code do, and which one should I use? Any input is appreciated Arkady.
  7. Voland

    NEW! Complete Order Editing Tool!

    Hi Stew, All that looks very logical. Unfortunatly it did not do a thing :(. Points Redeemed(115 x $0.20): -$22.99 <-- in the details and Points Redeemed(115 x $0.20): 22.99 <-- in the order editor what do you think?
  8. Voland

    [CONTRIBUTION] CCGV (trad)

    Hi Vger and every one :), Can you remind please which version of the original CCGV you took as a start for this CCGV(trad) rework. Thanks. Arkady
  9. Voland

    NEW! Complete Order Editing Tool!

    Your wish is my command ot_coupon (discount coupons) ot_gv (gift vouchers) ot_redemptions (Points) Whats next?
  10. Hello all, I was about to download the RMA Returns system. I have read though it and what it offers and loved it, just postponed implementation for a little. Now that I'm ready it seems to be gone http://www.oscommerce.com/community/contri...ch,Gift+Voucher And the forum thread seems to be either VERY slow :) or completely dead. http://forums.oscommerce.com/index.php?sho...ic=61077&st=480 What's going on? Does anyone know? Arkady
  11. Voland

    NEW! Complete Order Editing Tool!

    Hello everyone and HEllo Stew, Eh nice to see how you re helping folks. After all a lot of this mod is your creation. And where i come from it's said "We are responcible for those who got used to us" (sorry if anything is lost in translation). :) Anyway Im having a small issue. I have Points/Rewards and CCGV installed. When one or both of them are used in an order they apply negative values to the order total (ex: Points Redeemed(60 x $0.20): $-11.99). However those values when in the order editor's Discount, Shipping and Total section apear as positive ones. Which seems fine until you hit Update then obviosly those values get added and ... well you get the picture. An idea for a fix that I have is the following: on update check the description feild for strings that start with one of the following "Points" or "Coupon" or "Gift Voucher" and if one of those is found quickly slap a "-" before a value in the corresponding Amount feild, but not before checking if it's alredy there. Ah sounds so nice in English. Is this "doable" in PHP syntax? And of course if you have a much better solution (which you probably do) :) - would be great. Best regards, Arkady.
  12. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    Hi Deep-Silver, silly me... for some reason I thought I mentioned it somehwere in my previous post, I guess not. Anyway, the url is mindphantom.com/shop. However someone helped me fix the problem. And the fix involves the following changes. Please let me know if this looks safe and/or will not cause any problems. checkout_confirmation_php (// customer can't use points over the order total) Replaced: if (tep_calc_shopping_pvalue($customer_shopping_points_spending) > $order->info['total']) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL')); } with: if (round(tep_calc_shopping_pvalue($customer_shopping_points_spending),2) > round($order->info['total'],2)) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL')); } modules/order_total/ot_redemptions.php(// if customer is using points to pay) Replaced: if ($customer_shopping_points_spending > 0){ $order->info['total'] = $order->info['total'] - (tep_calc_shopping_pvalue($customer_shopping_points_spending)); with: if ($customer_shopping_points_spending > 0){ $order->info['total'] = round($order->info['total'],2) - round(tep_calc_shopping_pvalue($customer_shopping_points_spending),2); redemptions.php Replaced: function tep_calc_shopping_pvalue($points) { return((float)$points * (float)REDEEM_POINT_VALUE); with function tep_calc_shopping_pvalue($points) { return($points * REDEEM_POINT_VALUE); The initial problem I remind is the following: When a customer got to the payment information page while having enough points to cover the Total ticked the "use max points" box and clicked Continue, the checkout_confirmation.php sent him back to the payment page with the REDEEM_SYSTEM_ERROR_POINTS_OVER erro message in teh url. If you need me to recreate the behavior I can remove the above fixes so you can look at it. let me know :). Your input will be very important to me, and thank you for your time Arkady
  13. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    Deep-Silver :), did you have a chance to lookinto the issue I'm having? ... I am so lost at this point. When you have time test it out please, see what the casue could be. Arkady
  14. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    That's the thing. I never get to the confirmation page; it throughs me b ack to the Payment Info page with the REDEEM_SYSTEM_ERROR_POINTS_OVER error message in the URL :(. Test account is email: test@test.com pass: test5 There is an item in the shopping cart that produces the problem behavior. I have recently noticed that if you put other item(s) in the shopping cart then it lets you through onto the confimration page. I havnt figured out the pattern though. Got it! Fixed the lines in both admin and catalog. Thanks. :)
  15. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    No way. I have a flat rate shipping enabled an that's it. No other fees. I started having anothe rproblem which looks even more scarry :(. While Confirming points follwoing error is received: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1 select o.orders_id, o.orders_status, o.customers_name, o.customers_email_address, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, cpp.points_pending as points_pending, cpp.comment as comment, cpp.status as status from orders o , orders_total ot , orders_status s , customers_points_pending cpp where ot.class = 'ot_total' and cpp.status = '1' and cpp.orders_id = o.orders_id and o.orders_id = ot.orders_id and o.orders_status = s.orders_status_id and s.language_id = '1' order by o.orders_id DESC limit -20, 20 what's that?
  16. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    Deep-Silver, can you give me a hint on how to fix my problem please. :(
  17. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    Yep, I know :) ... I was going to aknowledge it but I got swomped by this weird behaivior. The thing is I rolled back to the original version of the file with original Points/Rewards code - without the fix. And it is still doing it. I am completely and utterly confused ... becasue teh value of the points are not OVER the Total. Also as far a as the code goes I wanted to clerify the difference between the following 2 variables $customer_shopping_points_spending and $customer_shopping_points Am I right to assume that the first corresponds to the Points dollar value being sent to checkout_confirmation.php (ex: whatever's entered in the tex feild); and the second is the customer's total Points dollar amount?
  18. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    I am still having the above problem. HEre is what it sais in the checkout_payment.php inside the Points Redemption section: You have 117.00 Shopping points with total worth $23.40. The estimated total of your purchase is: $14.99 . Enter the amount of Points you wish to spend : TEXTBOX Or tick here to use Maximum Points allowed for this order. (74.95 points) -> CHECKBOX I check the box click Continue and it returns me back to checkout_payment.php with the following message in the URL error_message=REDEEM+POINTS+ERROR+%21+Points+value+can+not+be+over+the+total+value.+Please+Re+enter+points I mean why does that // customer can't use points over the order total conditional gets met? Anyone wishing can test it out for themselves at www.mindphantom.com the products are not real feel free to make accounts and orders.
  19. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    Pleeeease someone help. I am going nuts here :)
  20. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    Confused! My originally edited checkout_confirmation.php is doing somethng weird. It keeps sending me back to checkout-payment.php with "error_message=REDEEM+POINTS+ERROR+%21+Points+value+can+not+be+over+the+total+value.+Please+Re+enter+points" message in the URL. It started doing it all of a sudden. The POints info is Points : 117.00 Value:$23.40 and the Total is $10.42. That peice of code in the checkout_confirmation.php // customer can't use points over the order total if (tep_calc_shopping_pvalue($customer_shopping_points_spending) > $order->info['total']) { $customer_shopping_points_spending = 0; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL')); } is doing that. But why?
  21. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    Exactly .. that is what CCGV does at if ($credit_covers) $payment='' as I think you ve pointed out some time before. Are you sure? I really dont think so, as this is only a conditional. Altough ill research that. If anything am under the impression if we use == then if the number of points is greater then (>), then the fix will only work in teh case of amount being exactly equal to. Ill have ot test it out :).
  22. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    Hi Tina, Well that looks pretty much like my sugestion. Only thing is you use == operator. However we want to not just check if the ammount of points is equal to but also if it's greater then, thus I used >=. But your fix usses the same logic as mine other then I incororated the fix into CCGV line of code. Still a confirmation by a knolwegebly programmer needed. Is tehre anybody out there? :)
  23. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    Ofcourse it would be much nicer to just perform a check and if tehre are enough points let the customer through no matter what is checked or uncheked, like CCGV does. And so here is my fix. Again this is just my own trial and error so I am not sure how well this fits into t he coding rules of osC and/or security. I have CCGV so take taht into account. There is a line in the checkout_confirmation.php created by CCGV(trad) if ($credit_covers) $payment=''; // CCGV Replace that line with if (!$credit_covers && $customer_shopping_points_spending && tep_calc_shopping_pvalue($customer_shopping_points_spending) >= $order->info['total'] && !is_object($$payment)) $payment=''; // CCGV and Point/Rewards The above code is taken from the follwing Points/Rewards line found further down in the same file //force customers to select other payment method if the points total not enough to cover the cost. if ( !$credit_covers && $customer_shopping_points_spending && tep_calc_shopping_pvalue($customer_shopping_points_spending) < $order->info['total'] && !is_object($$payment)) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_NOT), 'SSL')); All I did was change the < sign to >=. Now there is also a if ($credit_covers) $payment=''; // CCGV in the checkout_process.php. I am not sure if the same amendment needs to be made there as well. FOr now I left it untouched, and teh whole thing seems to work; that is I get passed to checkout_confirmation.php if I have enough points regardless of whether any payment option is selected or payment info entered. I supose people without CCGV can just use the Points/Rewards line refferenced above, just change the to >= and paste under "// load selected payment module" Can somone more knoledgable then myself comment on all of this please? Arkady
  24. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    Above I meant the if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) { $selection .= ' CHECKED'; } Apearantly one of those conditions is being met.
  25. Voland

    ### POINTS AND REWARDS MODULE V1.00 ###

    Here is my progress so far on the above issue, any real programmers pretty please coment and correct if nessesarry: To get the radio button to apear while having a single payment option in checkout_payment.php replace if (sizeof($selection) > 1) { echo tep_draw_radio_field('payment', $selection[$i]['id']); } else { echo tep_draw_hidden_field('payment', $selection[$i]['id']); } with echo tep_draw_radio_field('payment', $selection[$i]['id']); In other words remove the conditional all together and just bluntly place the radio button. in the same file (checkout_payment.php) a little higher up find if (sizeof($selection) > 1) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td> and replace the if (sizeof($selection) > 1) { with if (sizeof($selection) > 0) { to get the whole "Please Select" thing present. Problem is that the radio button apears CHECKED by default. I have isolated it to the following code in the functions/html_output.php // Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field() function tep_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') { $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"'; if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) { $selection .= ' CHECKED'; } if (tep_not_null($parameters)) $selection .= ' ' . $parameters; $selection .= '>'; return $selection; } //// // Output a form checkbox field function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters); } //// // Output a form radio field function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters); } I have no idea what any of those values and parameters mean in that first IF statement. I beleive that's where the mistery of the default CHECKED is h iding :) Can someone help?
×