3 replies [Last post]
netslave's picture
Offline
Joined: 05/22/2008
Juice: 187
Was this information Helpful?

Hello Ubercart Team,

I have some problems with the new implemented features for uc_cart. I am the maintancer of uc_ajax_cart and need direct access to not cached cart content.

To call this function:

<?php
theme
('uc_cart_block_content', $help_text, $items, $item_count, $item_text, $total, $summary_links);
?>

I must get all the arguments. This should be go inside the theme function. So it is better support to call cart content from everywhere according to theme function.

Better function call:

<?php
theme
('uc_cart_block_content');
//OR
theme('uc_cart_block_content',$cached );
?>

So have now problems with changing code inside a theming function.

Is is only a intention...

Bye

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: New theme and cache features in ubercart beta 4

Something your module can do is override the cache setting by changing the global $conf array on pageloads where the AJAX cart is being requested. Then calling the block function would load the full block as expected. An example of this is in the Cache Exclude module on d.o.

(Another method just got posted in a related issue on d.o.)

netslave's picture
Offline
Joined: 05/22/2008
Juice: 187
Re: Re: New theme and cache features in ubercart beta 4

Yeah could make this could be a solution ( was my post ;- ) ). But this is not a nice way. I must call variable_set and make an unecessary query to db.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: New theme and cache features in ubercart beta 4

No, like I said, you're actually adjusting the global $conf array which is all the loaded variables. You don't want to adjust the variable in the DB, just change it in the global array for that one pageload.