lch503

HomeSupportWordPress: Popular Widget Plugin 100K downloads

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • in reply to: hook addition requests #78664
    lch503
    Participant

    Thanks,

    Could you also make the following change to sagepay.php

    in the function add_hidden_fields( $output ),

    could you add a conditional statement for the lines

    $crypt .= ‘BillingState=’ . $data[‘billing_state’] . ‘&’;

    and

    $crypt .= ‘DeliveryState=’ . $data[‘address_state’] . ‘&’;

    as these are only required for the US, at the moment I must comment these out after every release.

    So, for example in psuedocode

    if ( currency = US dollars ) $crypt .= ‘BillingState=’ . $data[‘billing_state’] . ‘&’;

    and

    if ( currency = US dollars ) $crypt .= ‘DeliveryState=’ . $data[‘address_state’] . ‘&’;

    Thanks!

    in reply to: hook addition requests #71892
    lch503
    Participant

    Great! They have indeed!

    There is one issue in sagepay.php with the

    do_action( ‘ims_sagepay_notice_error’, $ImStore->error, $cartid );

    hook.

    Note that one on the parameters is $cartid which is not set until after the if statement. Moving the line

    $cartid = trim( $crypt_array[‘VendorTxCode’] );

    to before the if statement

    if( $crypt_array[‘Status’] != ‘OK’ ){

    fixes the issue. Apart from that the hooks work great 🙂

    Thanks again!

    Leon

    in reply to: hook addition requests #57121
    lch503
    Participant

    Thank you,

    More than happy to at my usual email address!

    Leon

    in reply to: bespoke cart page with extra options #57094
    lch503
    Participant

    I have this all working now.

    Thanks,

    Leon

    lch503
    Participant

    Thanks!

    This is good news, I have noticed this issue as well!

    Leon

    in reply to: Backup / restore image store #56912
    lch503
    Participant

    Also, all http requests to the old website link to the new website at the moment, so we cannot just link to the old website for the galleries.

    Leon

    in reply to: CD Implementation #55973
    lch503
    Participant

    Hello,

    I have completed the CD plugin.

    You can mark this as closed.

    Thanks,

    Leon

    in reply to: ims_after_update_cart hook #55972
    lch503
    Participant

    Hello,

    I have completed the CD plugin using he current hooks, therefore my request is not required. Thank you for all your help.

    You can mark this as closed.

    Thanks,

    Leon

    in reply to: ims_after_update_cart hook #55968
    lch503
    Participant

    Hello,

    If I use the ims_after_add_to_cart I have to recalculate everything, and resave my data to the database. Most of the code will be nearly all copy and paste what you have, and therefore just being re-executed.

    Would you please reconsider adding the hook ims_after_update_cart in the location I suggest as this would be a massive help in the creation of the CD plugin, as with this addition it is complete. (I have added it myself and it all works).

    Thanks,

    Leon

    in reply to: CD Implementation #55610
    lch503
    Participant

    Hello,

    I have managed to implement the change in the cookie without changing your code (its all done in the extension)

    Using before_post_actions I have implemented my own add_to_cart() method that is exactly the same as seen in _inc/store.php apart from changing the cookie expiry to time()+2.

    Thanks!

    Leon

    in reply to: CD Implementation #55608
    lch503
    Participant

    I think this is because the before_save_cart hook passes the cart, and not the store itself. Therefore I do not have access to the global $ImStore variables, only the cart.

    in reply to: CD Implementation #55603
    lch503
    Participant

    my function linking the before_save_cart hook is:

    
    function cd_in_cart( ){
    			global $ImStoreCart;
    			
    			if ( $ImStoreCart->cart['cderror'] = 1 ){
    				$ImStoreCart->cart['cderror'] = 0;
    			}
    			
    			$cart = $ImStoreCart->cart['images'];
    			foreach ( $cart as $id => $sizes ){
    				foreach ( $sizes as $size => $colors ) {
    					foreach ( $colors as $color => $values ) {
    						if ($cart[$id][$size][$color]['size'] = "CD"){
    							if ($ImStoreCart->cart['images'][$id][$size][$color]['quantity'] > 1){
    $ImStoreCart->cart['cderror'] = 1;
    								$ImStoreCart->cart['images'][$id][$size][$color]['quantity'] = 1;
    								$ImStoreCart->error = __( 'Error in CD Quantity', 'ims' );
    	}
    						}
    					}
    				}
    			}
    			
    		}
    }

    I find that if I use global $ImStore in this function I don’t have access to the $ImStore variables, but I do with the $ImStoreCart variables, hence I use that.

    I cannot therefore do as you suggest and falsify the $ImStore message variable. I have tried your suggestion and unfortunately this does not work.

    Thanks,

    Leon

    in reply to: CD Implementation #55592
    lch503
    Participant

    Hello,

    I am getting quite far now. I am working on the front end.

    If the customer chooses a CD option and requests more than one of the same image on a CD I have implemented an error system where the image store throws an error “invalid cd quantity” and resets the quantity to 1.

    This is implemented in the before_save_cart hook.

    This is working for the most part, however sometimes the error is seen as:

    “Successfully added to cartInvalid CD quantity”

    In the popover. This is shown with a green background rather than red as an error usually does. If I try again the error is thrown correctly.

    After some debugging I have narrowed it down to the expiry of the cookie set on line 566 in the add_to_cart() function of _inc/store.php. The line is setcookie(‘ims_message’)… If I set it to time() + 2 I don’t see the incorrect error. This is bad on my part because I am modifying your code.

    Is there a correct hook I can use to unset the cookie before the message is displayed, or if not could you please create one in your next release?

    Could you supply the correct code for invalidating this cookie correctly?

    Note that there is also a setcookie(‘ims_message’)… line of code on line 591 in the update_cart() function in _inc/store.php if you need to add a hook.

    Thanks,

    Leon

    in reply to: PHP Warning #55584
    lch503
    Participant

    I’m just using a local standard installation of MAMP for testing. I haven’t changed any of the settings under the hood, only adding a database and relocating the htdocs directory.

    I find it’s only in the backend. It’s weird as it all seems to work, so I don’t really understand it either! Never mind, no point in worrying about it if you don’t get the issue, I thought it might have been something with wordpress 3.8.

    Thanks for your time in trying to resolve the issue.

    Merry Christmas!

    Leon

    in reply to: PHP Warning #55572
    lch503
    Participant

    I have tried with a fresh installation of WordPress 3.8, fresh database, image-store 3.4.2 and still receive the warnings.

    Thanks,

    Leon

Viewing 15 posts - 1 through 15 (of 26 total)