Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

kenD

Archived
  • Posts

    29
  • Joined

  • Last visited

Posts posted by kenD

  1. Jason,

     

    Look what is sent for new customers:

    We welcome you to SkySoldier Prints.

     

     

     

    You can now take part in the various services we have to offer you. Some of these services include:

     

     

     

    Permanent Cart - Any products added to your online cart remain there until you remove them, or check them out.

     

    Address Book - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.

     

    Order History - View your history of purchases that you have made with us.

     

    Products Reviews - Share your opinions on products with our other customers.

     

     

     

    For help with any of our online services, please email the store-owner: [email protected].

     

     

     

    Note: This email address was given to us by one of our customers. If you did not signup to be a member, please send an email to [email protected].

     

    Congratulation, to make your first visit to our online shop a more rewarding experience

     

      below are details of a Discount Coupon created just for you

     

     

     

     

     

     

     

    To use the coupon enter the redeem code which is  during checkout,

     

    after making a purchase

     

     

     

     

     

     

     

    You can now take part in the various services we have to offer you. Some of these services include:

     

     

     

    Permanent Cart - Any products added to your online cart remain there until you remove them, or check them out.

     

    Address Book - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.

     

    Order History - View your history of purchases that you have made with us.

     

    Products Reviews - Share your opinions on products with our other customers.

     

     

     

    For help with any of our online services, please email the store-owner: [email protected].

     

     

     

    Note: This email address was given to us by one of our customers. If you did not signup to be a member, please send an email to [email protected].

     

    Do you know why it is doing this?

     

    Ken

  2. Jason, I just installed your contribution on a clean MS2.2, no changes, no other mods. I did a overwrite of the files you included in 506 and I get the same results....... voucher covers all charges, click submit and i am taken to paypal.

     

    The only thing that is not clean is the database....so i assume that some admin setting i have is causing the problem. Do you have any ideas?

     

    ken

  3. I just disabled all payment moduels just to see if I could check out with only a gift voucher....didn't work. I recieved a run time error stating an object is requiered.

     

    No matter which paypal module I use (I have IPN as well as the default one) if the total due is 0....I still get forwarded to paypal for payment.

     

    To install the gift voucher contribution, I did a overwrite. If there is sombody who uses paypal with this contribution and is not experiencing this problem, could you please post all your settings you have in admin.

  4. lc -

    is for the default language your customer sees during sign-up ... I guess you could check to see what language he uses and then put in the appropriate variable...i do not know what countries/lang paypal supports. In the end you do not need this line for english

     

    to display euro, you will need an additional line:

    tep_draw_hidden_field('currency_code', 'EUR').

     

    cs -

    is for the color of the screen, black or white...default is white

     

     

    you can see all the variables here PayPal Manual

     

    not to sure about the umlauts

     

    I dont work with euro, so I am not to sure how OSC stores the price for an item that is in Euro....if it stores it as US then converts it to Euro with the current exchange rate during order confimation, you will have to include that into the price for paypal....its just a matter of multiplying the price by the currency. somthing like this:

     

    number_format((amount$ * $currencies->get_value($my_currency)), $currencies->get_decimal_places($my_currency))).

     

    would replace the number format in this line:

     

    tep_draw_hidden_field(('amount_'.($loop+1)), number_format($amount, $currencies->get_decimal_places($my_currency))).

     

     

    Everyone needs to know if you populate the paypal cart, paypal determines how much to charge....you can't tell paypal to charge 100 if everything in the cart adds to 60...... You should be able to transfer shipping, but i was unable to so I transefered shipping as a cart item.....

     

    I just did this so in case a customer does not press continue at paypal, i still had a record of what was in the cart, with the options selected

  5. mimages -

    Will this code work to automatically create a paypal entry, or dooes it need fixing?

     

    It works the way it is, it prepopulates the signup form (minus the phone, state and email) and it creates your shoping cart in paypal so that when you recieve an ivoice from paypal you can see all the items that were purchased.....not just an amount.

     

    frank1002us -

     

    .....like i said I do not know php to well, but the code worked in its original state..... it will take me some time to go through your changes.

  6. typo in the bottom portion, where it says:

     

    tep_draw_hidden_field(('os0_'.($loop+1)), $optionvalue).

    tep_draw_hidden_field(('os0_'.($loop+1)), $option);

     

    should be:

     

    tep_draw_hidden_field(('os0_'.($loop+1)), $optionvalue).

    tep_draw_hidden_field(('on0_'.($loop+1)), $option);

  7. This is not fully complete but it works (at least for me, I have MS2). What this does is prepopulates your cart info into paypal, so when you recieve the invoice from paypal you dont just have an amount, you have the items and options listed as well, also the same as another contribution that prepopulates the signup form. Since I am not very familiar with PHP or OSC, I hope somebody can fill in the holes. Its my first contribution, so I hope sombody can use it!

     

    Problems:

    1. The following will not prepopulate for the following reasons

    a. phone number / phone number needs to be split into 3 strings,

    night_phone_a, night_phone_b, night_phone_C

    Somebody should know how to do this...these var must only contain #'s

    b. email / I dont have the correct pointer for the customer email address

    c. State / State needs to be a 2 letter state, the pointer I am using is the full name of the state, I need to know how to get the 2 letter abbreviation.

     

     

    in catalog/includes/moduels/payment/paypal.php find

     

        function process_button() {
         global $order, $currencies, $currency;
    
         if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {
           $my_currency = $currency;
         } else {
           $my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5);
         }
         if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {
           $my_currency = 'USD';
         }
         $process_button_string = tep_draw_hidden_field('cmd', '_xclick') .
                                  tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .
                                  tep_draw_hidden_field('item_name', STORE_NAME) .
                                  tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .
                                  tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .
                                  tep_draw_hidden_field('currency_code', $my_currency) .
                                  tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .
                                  tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
    
         return $process_button_string;
       }

     

    and replace with

     

    function process_button() {
    global $order, $currencies, $currency;
    
    if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {
    $my_currency = $currency;
    } else {
    $my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5);
    }
    if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {
    $my_currency = 'USD';
    }
    $process_button_string = tep_draw_hidden_field('cmd', '_ext-enter') .
    tep_draw_hidden_field('redirect_cmd', '_cart') .
    tep_draw_hidden_field('cs', '1') .
    tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .
    tep_draw_hidden_field('item_name', STORE_NAME ) .
    tep_draw_hidden_field('currency_code', $my_currency) .
    tep_draw_hidden_field('day_phone_a', $order->customer['phone']).
    tep_draw_hidden_field('day_phone_b', $order->customer['phone']).
    tep_draw_hidden_field('day_phone_c', $order->customer['phone']).
    tep_draw_hidden_field('first_name', $order->billing['firstname']).
    tep_draw_hidden_field('last_name', $order->billing['lastname']).
    tep_draw_hidden_field('address1', $order->billing['street_address']).
    tep_draw_hidden_field('city', $order->billing['city']).
    tep_draw_hidden_field('state', $order->billing['state']).
    tep_draw_hidden_field('zip', $order->billing['postcode']).
    tep_draw_hidden_field('email', $order->customer['email']).
    tep_draw_hidden_field('lc', 'US') .
    tep_draw_hidden_field('rm', '2') .
    tep_draw_hidden_field('notify_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .
    tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .
    tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')).
    tep_draw_hidden_field('upload', '1');
    
    for ($loop=0; $loop<sizeof($order->products); $loop++) {
    $amount=0;
    $optionvalue=': ';
    $process_button_string = $process_button_string.
    tep_draw_hidden_field(('quantity_'.($loop+1)), ($order->products[$loop]['qty'])) .
    tep_draw_hidden_field(('item_name_'.($loop+1)), ($order->products[$loop]['name']));
    
    if (sizeof($order->products[$loop]['attributes']) > 0) {
         for ($j=0; $j<sizeof($order->products[$loop]['attributes']); $j++) {
             $amount = $amount + ($order->products[$loop]['attributes'][$j]['price']);
        $option = $option.($order->products[$loop]['attributes'][$j]['option']).', ';
             $optionvalue = $optionvalue.($order->products[$loop]['attributes'][$j]['value']).', ';
    
         }
       }
    $amount = ($amount + ($order->products[$loop]['price']));
    $process_button_string = $process_button_string.
    tep_draw_hidden_field(('amount_'.($loop+1)), number_format($amount, $currencies->get_decimal_places($my_currency))).
    tep_draw_hidden_field(('os0_'.($loop+1)), $optionvalue).
    tep_draw_hidden_field(('os0_'.($loop+1)), $option);
    $option = '';
    $optionvalue=': ';
    $amount=0;
    }
    
    
    $process_button_string = $process_button_string.
    tep_draw_hidden_field(('item_name_'.($loop+1)), 'Shipping') .
    tep_draw_hidden_field(('amount_'.($loop+1)), number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency)));
    return $process_button_string;
    }

  8. How can we not store cookies for guests?

     

    As it is now, if a guest places an order but does not complete the payment process, and close the web page......the next time you come on the site you will see the Welcome guest and the cart will still have the items.

     

    I guess you could have a logout, but normally people dont pay attention to that....the best thing to do would be to clear the cookies once a guest signs in and not store them....but how would you do that?

×
×
  • Create New...