Your account is limited to posting only in the Pre-Sales Questions forum.
Support forum access is limited to members with a purchase history.

If you are working on behalf of another member, please contact us with the name of the license holder and we will upgrade your account.
   
2 of 2
2
First custom plugin - Tax. Help?
Posted: 26 July 2012 07:53 AM   [ Ignore ]   [ # 16 ]
Is a Really Great Dancer
RankRank
Total Posts:  71
Joined  2011-09-09

Ah… That reduced the load time dramatically. Its still firing 4x, but I’ll take that over 15x. Thanks so much, Chris.

Profile
 
 
Posted: 26 July 2012 07:59 AM   [ Ignore ]   [ # 17 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10218
Joined  2008-09-29

And I think that’ll go down. I recently revised CT a bit to stop loading the tax API itself in multiple places. I think the tax API’s being loaded and called a few places in a slightly older version of CT, and I nixed that recently for consistency’s sake. I’d guess that once it’s only being loaded one time it might reduce the number of times it fires to 1.

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 30 July 2012 06:53 AM   [ Ignore ]   [ # 18 ]
Is a Really Great Dancer
RankRank
Total Posts:  71
Joined  2011-09-09

Any timeline on a release of CT that reflects the further reduction of load frequency of the tax api?

Profile
 
 
Posted: 30 July 2012 09:56 AM   [ Ignore ]   [ # 19 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10218
Joined  2008-09-29

If you’re not on CT 2.1.4+…. upgrade. I was thinking it was in that, but might not be.  Otherwise, I don’t have a specific date yet for the next launch. If you’re up to date, I’ll check and see where it’s at.

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 31 July 2012 06:52 AM   [ Ignore ]   [ # 20 ]
Is a Really Great Dancer
RankRank
Total Posts:  71
Joined  2011-09-09

Yes, this particular project is on CT 2.1.4

Profile
 
 
Posted: 31 July 2012 10:22 AM   [ Ignore ]   [ # 21 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10218
Joined  2008-09-29

The tax changes I made with regards to the API were already in 2.1.4. So for now, there’s not going to be any reduced loads of that particular call.

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 03 August 2012 07:58 AM   [ Ignore ]   [ # 22 ]
Is a Really Great Dancer
RankRank
Total Posts:  71
Joined  2011-09-09

I’m making a revision to my tax plugin in order to calculate tax by shipping address or a predetermined pickup location’s zip code.
I’ve hard-coded the pickup addresses into my plugin as variables.
The choice of shipping versus pickup is stored in a custom_data value.

My problem: it seems that my tax plugin can’t access custom data…? I’m getting an error when the tax plugin fires on this first line:

$custom_data $this->EE->cartthrob->cart->order('custom_data');  
  
$pickup $custom_data['local_pickup']
Profile
 
 
Posted: 07 August 2012 06:34 AM   [ Ignore ]   [ # 23 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10218
Joined  2008-09-29

->order is POST order

you’re currently in the CART data stage

$custom_data $this->EE->cartthrob->cart->custom_data(); 

or 
$pickup $this->EE->cartthrob->cart->custom_data("local_pickup"); 
 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 07 August 2012 11:03 AM   [ Ignore ]   [ # 24 ]
Is a Really Great Dancer
RankRank
Total Posts:  71
Joined  2011-09-09

I’m using this at the top of my get_tax() method…

$custom_data $this->EE->cartthrob->cart->custom_data(); 

I’m getting this error:

A PHP Error was encountered

Severity
Notice

Message
Undefined propertyCartthrob_tax_avalaris::$EE

Filename
tax_plugins/Cartthrob_tax_avalaris.php

Line Number
27 
Profile
 
 
Posted: 08 August 2012 05:12 AM   [ Ignore ]   [ # 25 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10218
Joined  2008-09-29

Sorry. That should have been

$this->core->cart->custom_data()

 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 08 August 2012 06:54 AM   [ Ignore ]   [ # 26 ]
Is a Really Great Dancer
RankRank
Total Posts:  71
Joined  2011-09-09

AH, ok. That seems to have corrected my error problem.

Are there methods for *writing* to the cart? I need to set the shipping address invisibly based on the pickup location they choose from a dropdown menu. They’ll choose a pickup location by name, but my tax plugin needs to set the shipping address using some hard-coded values I’ve set up in my plugin.

Of course, I can’t *write* to: $this->core->cart->customer_info(“shipping_address”)

My alternate option was to use some jquery to append some hidden form values to the HTML on the client side so they are submitted invisibly with the shopping cart (pre-checkout) form. But I’d like to be able to do all of it inside my plugin instead…

Profile
 
 
Posted: 08 August 2012 07:32 AM   [ Ignore ]   [ # 27 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  10218
Joined  2008-09-29
$this->core->cart->set_customer_info($field$value); 

 

Look at Cartthrob/cartthrob/core/cartthrob_cart.php LOTS of functions in there whose purpose should be obvious

$this->core->cart->set_customer_info("shipping_address""123 street" );
$this->core->cart->save(); 
 Signature 

We’re moving away from the forums, though not entirely and not immediately. Lack of support lately is coincidental to that. Unfortunately we’ve had a bad month with it, but we do not forsee that we will have any continued problems with support through our portal going forward, or on forums while we’re still transitioning. We will send out a newsletter and make additional notifications through twitter and other outlets over the coming weeks.

Moving forward; things returning to normal.

Profile
 
 
Posted: 08 August 2012 07:47 AM   [ Ignore ]   [ # 28 ]
Is a Really Great Dancer
RankRank
Total Posts:  71
Joined  2011-09-09

Wow, that’ll help alot. Thanks, Chris.

Profile
 
 
   
2 of 2
2