Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

aarondwyer

Archived
  • Posts

    30
  • Joined

  • Last visited

Posts posted by aarondwyer

  1. Hi All

     

    The EP contributions area has gone bannanas since I was last in there hasn't it.

     

    I'd like to ask if anyone has ever used the Easy Populate system to enter in CATEGORY images and sort order etc.

     

    I don't think this has been done, but you never know.

     

    If it hasn't I may have to sit down and write it.

     

    Thanks

    Aaron

  2. I really like this addition but have a question. Regarding the onclick="clearRadeos()" feature that can clears the payment options if there the available GV balance exceeds the cart total:

     

    Has anyone else noticed that you can't click the actual checkbox? I can click anywhere else on that line, but not the checkbox.

     

    Jared

     

    I've tested this with Firefox and IE 6. No problems for me. Check over your install again, and perhaps you have conflicting code from other contributions.

     

    Sorry looks like you're going to have that sore head after all. :(

     

    Aaron

  3. You should check through the install again. You must have missed or added a } somewhere

     

    Aaron

     

    Hi,

     

    I am trying to install this contribution but am getting the following error.

     

    Parse error: parse error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in

    /includes/classes/order_total.php on line 306

     

    line 306 is: // if ($GLOBALS[$class]->include_tax == 'false') $order_total=$order_total-$order->info['tax'];

    and part of the file..

    // Called at various times. This function calulates the total value of the order that the

    // credit will be appled aginst. This varies depending on whether the credit class applies

    // to shipping & tax

    //

    function get_order_total_main($class, $order_total) {

    global $credit, $order;

    // if ($GLOBALS[$class]->include_tax == 'false') $order_total=$order_total-$order->info['tax'];

    // if ($GLOBALS[$class]->include_shipping == 'false') $order_total=$order_total-$order->info['shipping_cost'];

    return $order_total;

    }

    // ICW ORDER TOTAL CREDIT CLASS/GV SYSTEM - END ADDITION

    }

    Hope someone can help.

    Thanks

     

     

    Sorry you may be on your own working in those other contributions.

     

    In the past I've always tried to get troublesome contributions working on there own first with a clean install of osCommerce, then merge them in from there.

     

    Aaron

     

    Aaron, et al...

     

    I've installed this contribution and it works wonderfully (on its own). However, I've tried to install the PWA (purchase without account) contribution and now in my php error log I get a PHP error* which manifests to the user as the browser appearing blank on checkout_payment.php.

     

    When I remove line 191 from checkout_payment.php the problem goes away but so does the coupon redemption feature. :-(

     

    I also attempted to install the FEC (Fast Easy Checkout) contribution seperately (my FEC and PWA installs do not overlap and are completely and totally seperate - I need PWA functionality so I'm running mirrors of my production site in test to get PWA functionality going) and the same PHP error* occurs.

     

    * = PHP Fatal error: Call to a member function mod_process() on a non-object in c:\htdocs\store\checkout_payment.php on line 191

     

    Line 191 = $testing=$GLOBALS['ot_gv']->mod_process();

     

    Any ideas?

     

    Help!

  4. Hopefully this isn't considered a cross post since it APPLIES THE SAME CONTRIBUTION (MODS)

     

    I've added the osCommerce Credit Class and Gift Voucher "Easier to Understand" Payment Addon v1.2

     

    Everything works as far as can be seen, but this is the error........i've tried searching for the function on line 84 with this part of the function flagging the error

     

    Warning: Missing argument 1 for javascript_validation() in /homepages/2/XXXXXXXXXXX/htdocs/GForce/shopping/includes/classes/payment.php on line 84..........Line 84 is where the function javascript_validation($coversAll) { begins

     

    There were one or two little warnings etc from javascript. But I ignored them since it wasn't an error. No time for warnings. :)

     

    If you can fix them without loosing any functionality, post just what you changed (rather than the whole function) and we'll all give it a go. If it's good it should be wrapped into the mod.

     

    Aaron

  5. Lots of echo's and 1/2 hour later I have solved the mysterious Windows issues.

     

    You must use the full path. DIR_FS_CATALOG. Adjusted to remove the extra slashes. I can't see why full path wouldn't work under unix as well. We'll soon see.

     

    Tom maybe you can make this code better and work something into your contrib.

     

    in file /catalog/imagemagic.php

    in function modify_tn_path($file, $check_cache)

     

    			//create the directory tree if not already there
    		$create_path=dirname($tn_path. $file);
    //added this line for windows
    		$create_path = substr(DIR_FS_CATALOG,0,strlen(DIR_FS_CATALOG)-1) . $create_path;

     

    and

     

    //			return $tn_path. $file;
    //comment the above line, added this line for windows
    		return substr(DIR_FS_CATALOG,0,strlen(DIR_FS_CATALOG)-1) . $tn_path . $file;

     

    Thanks

    Aaron

  6. You were correct.

     

    It wasn't using ImageMagic before at all.

     

    The fix you just mentioned now works like a treat, and the ImageMagic is now actually being used.

     

    I can now run with Image Required = false.

     

    Thank you.

     

    I'm one of the ones from On the Fly that could *never* get server caching to work on windows.

     

    It didn't bother me before because I develop on windows and host with linux and it worked on linux.

     

    Now I have a task to get it onto a host running windows and am still not able to server cache.

     

    Does Image Magic store in an 'thumbnails' sub directory for each image directory or in 1 /images/thumbnails folder? I wasn't sure what the readme was referring to. I have several subdirectories since I've categorised my image directory.

     

    My windows system is not writing the thumbnails to the drive at all. At least ImageMagic doesn't die badly when you have server cache turned on unlike On the Fly.

     

    Thanks

    Aaron

  7. After toggling options for the last half hour, I've worked out that you have to have set in the Images configuration for Image Required = true

     

    This allows the images to be shown, and Image Magic is now doing it's thing.

     

    I don't really want to have this set, since there are several instances of where I don't have an image, and I'd rather not see a failed image holder.

     

    Any ideas?

     

    Thanks

    Aaron

  8. Ok I'll be first cab off the rank and raise my hand to be dolt of the day.

     

    Is anyone else unable to get their images to show.?

     

    My product images <img src="blah"> tags are completely missing in the final html, hence no images are showing.

     

    The other images (non-product) are all showing up ok.

     

    I think this could be related to the shop / non shop image selection option (which is a good option to have).

     

    I'm still investigating. Anyone have any ideas for me.

     

    Thanks

    Aaron

  9. Well done Tom.

     

    Just going through it now and integrating it.

     

    Issue with the readme.html in the install with html_output.php, the code is missing a ';' on the $image_size line. Should be this.

     

      if (strtolower(getcwd())."/" != strtolower(DIR_FS_CATALOG)) {
    	$image_size = @getimagesize("../..".$src);
    	$src=str_replace(DIR_WS_CATALOG_IMAGES,DIR_WS_IMAGES,$src);
     }

     

    Thanks

    Aaron

  10. Mike/Aaron,

     

    I tried again using the steps outlined in mikes post, but my site seems to work fine. It returns the invalid voucher code error.

     

    Must be something wrong with Mikes code?

     

    Jono

     

    Ok I think that's nailed it now.

     

    I've just posted v1.2 to the contributions section. Thanks for the help. Jonyo should be proud of this, it took a fair bit of effort to get it together. I know I am. I wonder if he's seen this yet? :)

     

    Cheers

    Aaron

  11. 1) If check/money order or paypal is selected as the payment method (not using any gift cert, etc), and I click "redeem" with nothing entered into the input box... Then I am redirected straight on to the confirmation page, af if I had simply clicked "continue".

     

    Tried to reproduce this following your example, and it works fine for me.

     

    Can anyone else using Mike's 1,2,3,4 steps produce the Redeem button error.?

     

    PS As for turning the check box into a radio button, I thought of doing that as well, but then thought that using a voucher should look different - mostly since not every gift voucher covers the whole cost. So it's always an add on to a payment option, not an option in itself. Hope that makes sense.

     

    Thanks

    Aaron

  12. Sorry I missed adding the Begin and End markers on that change when I first merged the code, so it didn't make it into the install.

     

    I've now added it to v1.2 of this contribution which is pending on Mike investigating his redeem button issue. You never know there may be some other issue.

     

    I don't have that issue on either Firefox or IE6. What browser are you using.?

     

    You actually only need to do this to make it work. The other code you commented out shouldn't affect the outcome.

     

    Locate this within the function credit_selection() and make the change

    	   while (list(, $value) = each($this->modules)) {
    	 $class = substr($value, 0, strrpos($value, '.'));
    	 if ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) {
    
    // #################### Begin Added CGV JONYO ######################
    	   //$use_credit_string = $GLOBALS[$class]->use_credit_amount();
    // #################### End Added CGV JONYO ######################
    
    	   if ($selection_string =='') $selection_string = $GLOBALS[$class]->credit_selection();
    	   if ( ($use_credit_string !='' ) || ($selection_string != '') ) {

     

    Let me know about any other issues and I'll roll them into v1.2

     

    Thanks

    Aaron

  13. Mike

     

    What's the go with the extra brace you were talking about.

     

    I must be going blind, I can't see the problem.

     

    	function pre_confirmation_check() {
    // #################### Begin Added CGV JONYO ######################
      global $payment, $order, $credit_covers, $customer_id;
    // #################### End Added CGV JONYO ######################
      if (MODULE_ORDER_TOTAL_INSTALLED) {
    	$total_deductions  = 0;
    	reset($this->modules);
    	$order_total = $order->info['total'];
    	while (list(, $value) = each($this->modules)) {
    	  $class = substr($value, 0, strrpos($value, '.'));
    	  $order_total=$this->get_order_total_main($class,$order_total);
    
    	  if ( ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) ) {
    		$total_deductions = $total_deductions + $GLOBALS[$class]->pre_confirmation_check($order_total);
    		$order_total = $order_total - $GLOBALS[$class]->pre_confirmation_check($order_total);
    	  } //end if
    	} //end while
    // #################### Begin Added CGV JONYO ######################
    
      $gv_query=tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");
      $gv_result=tep_db_fetch_array($gv_query);
      $gv_payment_amount = $gv_result['amount'];
    
    //		echo 'total='. $order->info['total'];
    //		echo ' deduc='. $total_deductions;
    //		echo ' gvamount='. $gv_payment_amount;
    
    //		if ($order->info['total'] - $total_deductions <= 0 ) {
    	if ($order->info['total'] - $gv_payment_amount <= 0 ) {
    		if(!tep_session_is_registered('credit_covers')) tep_session_register('credit_covers');
    			  $credit_covers = true;
    	}
    	else {   // belts and suspenders to get rid of credit_covers variable if it gets set once and they put something else in the cart
    			if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');
    	} //end else
    // #################### End Added CGV JONYO ######################
      } //end if (MODULE_ORDER_TOTAL_INSTALLED)
    } //end function

     

    Looks like it needs both.

     

    Aaron

  14. It appears I've left something else out of the readme.html [sorry]

     

    This is to go in /catalog/includes/classes/order_total.php

     

    		  if ( ($GLOBALS[$class]->enabled && $GLOBALS[$class]->credit_class) ) {
    		$post_var = 'c' . $GLOBALS[$class]->code;
    // #################### Begin Added CGV JONYO ######################
    //			if ($HTTP_POST_VARS[$post_var]) $_SESSION[$post_var] = $HTTP_POST_VARS[$post_var];
    //			if (!tep_session_is_registered($post_var)) tep_session_register($post_var);
    		if ($HTTP_POST_VARS[$post_var]) {
    							if (!tep_session_is_registered($post_var)) tep_session_register($post_var);
    // ############ Added CCGV Contribution ##########
    			$post_var = $HTTP_POST_VARS[$post_var];
    // ############ End Added CCGV Contribution ##########
    					}
    // #################### End Added CGV JONYO ######################
    		$GLOBALS[$class]->collect_posts();
    	  }

     

    I'll add this to the installer as well before I resubmit for v1.1

     

    Aaron

  15. Hi Mike

     

    My bad on that one. Thank you for finding that.

     

    I left out the mod_process function in the installer. I'll fix up the readme and repost to the contribution area.

     

    I knew I'd miss something. I'm glad people are getting into it.

     

    Aaron

     

    This is what the first section of the installer html should have been for ot_gv.php

     

    	  $this->show_redeem_box = MODULE_ORDER_TOTAL_GV_REDEEM_BOX;
      $this->credit_class = true;
    // #################### Begin Added CGV JONYO ######################
    //	  $this->checkbox = $this->user_prompt . '<input type="checkbox" onClick="submitFunction()" name="' . 'c' . $this->code . '">';
    $this->checkbox = $this->user_prompt . '<input type="checkbox" onClick="clearRadeos()" name="' . 'c' . $this->code . '">';
    // #################### End Added CGV JONYO ######################
      $this->output = array();
    }
    
    // #################### Begin Added CGV JONYO ######################
    // #################### if you set it in admin to not include tax or shipping in the amount
    
    function process() {
      global $order, $currencies, $cot_gv;
    //	  if ($_SESSION['cot_gv']) {  // old code Strider
       if (tep_session_is_registered('cot_gv')) {
    	$order_total = $this->get_order_total();
    	$od_amount = $this->calculate_credit($order_total);
    	if ($this->calculate_tax != "None") {
    	  $tod_amount = $this->calculate_tax_deduction($order_total, $od_amount, $this->calculate_tax);
    	  $od_amount = $this->calculate_credit($order_total);
    	}
    	$this->deduction = $od_amount;
    //		if (($this->calculate_tax == "Credit Note") && (DISPLAY_PRICE_WITH_TAX != 'true')) {
    //		  $od_amount -= $tod_amount;
    //		  $order->info['total'] -= $tod_amount;
    //		}
    	$order->info['total'] = $order->info['total'] - $od_amount;
    	if ($od_amount > 0) {
    	  $this->output[] = array('title' => $this->title . ':',
    					   'text' => '<b>' . $currencies->format($od_amount) . '</b>',
    					   'value' => $od_amount);
    	}
      }
    }
    
    function mod_process() {
     global $currencies;
       $my_order_total = $this->get_order_total();
       $my_od_amount = $this->calculate_credit($my_order_total);
       if ($this->calculate_tax != "None") {
    	 $tod_amount = $this->calculate_tax_deduction($my_order_total, $my_od_amount, $this->calculate_tax);
    	 $my_od_amount = $this->calculate_credit($my_order_total);
       }
       $this->deduction = $my_od_amount;
       //$order->info['total'] = $order->info['total'] - $my_od_amount;
       if ($my_od_amount > 0) {
    	 $this->my_output[] = array('title' => $this->title . ':',
    					  'text' => '<b>' . $currencies->format($my_od_amount) . '</b>',
    					  'value' => $my_od_amount);
       }
      }
    
    // #################### End Added CGV JONYO ######################
    
    function selection_test() {
      global $customer_id;

     

    Aaron

  16. Hi All

     

    I've finally pulled finger and after a couple of months have brought together a bunch of code that began in the middle of the main Credit Class and Gift Voucher support thread here

     

    http://www.oscommerce.com/forums/index.php?sho...=158518&st=2037

     

    It was originally coded by Jonyo and it is a very nice addon that makes the payment screen for customers that wish to use their gift vouchers easier to understand.

     

    I've taken the code and massaged it into shape and made the contribution installer for it. The code is spread over many pages of the main support thread, and was almost impossible to get working.

     

    This installer should now make it easier for everyone to have this in their shop.

     

    I've separated this thread from the main one, because it is really an addon to main contribution.

     

    The contribution itself will go into the normal Credit Class and Gift Voucher contribution.

     

    I will be posting the contribution shortly, but needed to make this thread first, so that I could reference it in the readme file.

     

    Regards

    Aaron

  17. Just finsihed a new version of this contrib which will have some extra features such as watermarking, buttonize and framing of thumbnails and quality adjustment etc. It will also have a more reliable (I hope) caching mechanism.

     

    I am doing a bit of testing and will release it tomorrow.

     

    In the meantime, if you want to see an example of some of the output go to http://www.celtware.com/autothumb.htm

     

    That looks bloody brilliant. Can't wait.

     

    My local development box (Windows OS) still can't get the images to display without doing this

     

    $tn_server_cache = false;

     

    Even with Tom's modified function modify_tn_path($file)

     

    Oh well. As long as it works on the server (I hope it still does)

     

    Thanks

    Aaron

  18. For everyone who is having difficulty with this mod and getting the broken image symbol, or can't use the cache functionality (which it seems is a lot of people if the posts here are anything to go by) try this solution.

     

    Post here whether or not it works for you, so that this mod can be improved for others.

     

    Hi tomjmul

     

    I think there is something not right about your code. The replacement code looks the same as the code to replace.

     

    From what you mention this is exactly what I need to implement to get this working. Please repost again.

     

    Regards

    Aaron

  19. Hi all

     

    Well I've finally sorted out the age old Paypal IPN email problem with customers not returning to the site and the final section of the ordering process not taking place.

     

    I have based this on Paypal IPN v1.1, and before I release the addon to the contribution section, I need some others to test it out. Preferably those with secure connections to Paypal.

     

    I have tested this with an unsecure connection and it works fine. Even if a customer doesn't hit that pesky final return to the site button, they and you will get a confirmation email of the order.

     

    The method that I have chosen I believe does not have a race condition associated with it, and should solve this problem.

     

    Also the good news is that it is like the Paypal IPN mod completely stand alone from the core files.

     

    Please send me an email of your interest to test this, because I would like to put this into the contributions.

     

    In a nutshell the idea is that on the confirmation button being pushed by the customer, instead of the user being directed to Paypal, they get sent to a new page which then sends the emails etc, then they automatically get sent over to Paypal.

     

    Of course the Paypal IPN process area has the emails turned off so that 2 emails aren't sent. Simple eh. But it did take some thinking.

     

     

     

    Thanks

    Aaron

×
×
  • Create New...