Jump to content

huggettm

Member
  • Posts

    294
  • Joined

  • Last visited

Posts posted by huggettm

  1. I am using
    PayPal Website Payments Pro & Express Checkout integration. with express only enabled?

    if a customer is not logged in (a new customer), the option to checkout by paypal does not appear until after the address info is asked for

     

  2. 19 hours ago, bsmither said:

    In /classes/cubecart.class.php, near line 1676:

    
    Find:
    
    // Lets try to choose cheapest shipping option
    // for them if they haven't chosen already
    if ((!isset($this->_basket['shipping']) && !$digital_only) || (!$offset_matched && isset($this->_basket['shipping']['offset']) && !$digital_only)) { // Scanning for cheapest shipping because shipping has yet to be set and this basket is not digital only.
    	foreach ($shipping_values as $value) {
    		if (!isset($cheapest['value']) || $value['value'] < $cheapest['value']) { // Found a cheaper value!
    			$cheapest = $value;
    
    Change the comparison of less than to greater than.

     

    Thanks brian,

     

    I tried this

     

    // Lets try to choose cheapest shipping option
                    // for them if they haven't chosen already
                    if ((!isset($this->_basket['shipping']) && !$digital_only) || (!$offset_matched && isset($this->_basket['shipping']['offset']) && !$digital_only)) {
                        foreach ($shipping_values as $value) {
                            if (!isset($cheapest['value']) || $value['value'] > $cheapest['value']) {
                                $cheapest = $value;
                            }

     

    but it makes no difference in the cart view

  3. Has anyone changed the checkout proceedure so that alternate checkouts are more easily seen.

     

    For example on foundation, you have to go to basket/secure checkout and then only after the fields to enter text for name address etc is the option for paypal checkout (which doesnt need forms)

     

    can this be added as a link to the view cart popup?

     

  4. that doesnt seem to work, have I over simplified it?

     

    ah got it, I didnt change the character number after the prefix to 3 in my case:

    public static function validOrderId($order_id) {
            if(preg_match('#^[OFD]{3}[0-9]{6}-[0-9]{6}-[0-9]{4}$#i', $order_id)) {
                return true;

  5. Hi Keat,

    Thank you much appreciated.  so in my case I would also need to change order.class:

     

     

    public static function validOrderId($order_id) {
            if(preg_match('#^[OFD]{2}[0-9]{6}-[0-9]{6}-[0-9]{4}$#i', $order_id)) {
                return true;

  6. ok thank you

     

    is there a way to search for the instances of cart_order_id  - or is it a manual check of all tables?

     

    so far i can see

    order_history

    order_inventory

    order_notes

    order_summary

    order_tax

    cubecart_transactions

    which would be

     

    ALTER TABLE `CubeCart_transactions` CHANGE `order_id` `order_id` VARCHAR(24) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
    ALTER TABLE `CubeCart_order_history` CHANGE `cart_order_id` `cart_order_id` VARCHAR(24) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
    ALTER TABLE `CubeCart_order_inventory` CHANGE `cart_order_id` `cart_order_id` VARCHAR(24) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
    ALTER TABLE `CubeCart_order_notes` CHANGE `cart_order_id` `cart_order_id` VARCHAR(24) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
    ALTER TABLE `CubeCart_order_tax` CHANGE `cart_order_id` `cart_order_id` VARCHAR(24) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
    ALTER TABLE `CubeCart_order_summary` CHANGE `cart_order_id` `cart_order_id` VARCHAR(24) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;

  7. thank you,

    so to add a prefix "OFD" the function

    $this->_order_id = date('ymd-His-').rand(1000, 9999);

    becomes

    $this->_order_id = OFD.date('ymd-His-').rand(1000, 9999);

     

    ?

    is there a function to change the order_id in the db,

     

    I have just seen it is also in cubecart_transactions also

×
×
  • Create New...