Download & Extend

pictured cart foir anonymus user

Project:Ubercart pictured cart block
Version:6.x-1.0-beta3
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi

to provide a good usability, customer must not create first an user account in my shop.
They can create a Login in the checkout.

I tried the pictured cart and I love it, but is there way to provide it to anonymus user too?

thx
bennos

Comments

#1

Sorry, i wasn't there because of my vacation.

Anonymous users can use it if cache disabled in "Site perfomance" section. It is the problem common for Ubercart's shopping cart.

#2

The fact that this module is incompatible with normal cache makes it unusable for my purpose and I didn't even notice it until we launched the site with the pictured cart block. Now I have to find a way to make it work or downgrade to the default cart because the site will bring the server down without caching.

Also, we have a couple of sites with the default shopping cart block and caching enabled which seem to be working perfectly. As far as I'm concerned this is a problem for the pictured cart block and it should be addressed immediately.

If there is no way to make this module work with normal caching then there should be a warning on the project page and on "admin/settings/performance" because currently this is what it says for me:

Caching mode:
Disabled
Normal (recommended for production sites, no side effects)
Aggressive (experts only, possible side effects)

The normal cache mode is suitable for most sites and does not cause any side effects. The aggressive cache mode causes Drupal to skip the loading (boot) and unloading (exit) of enabled modules when serving a cached page. This results in an additional performance boost but can cause unwanted side effects.

The following enabled modules are not compatible with aggressive caching and will not function properly: devel, uc_cart, uc_store.

"does not cause any side effects" is not really the same as "does not work with Ubercart's shopping cart blocks" or "incompatible with pictured cart block" is it?

#3

I've checked this out some more and I found this: http://www.ubercart.org/docs/user/9168/cart_block_now_safe_page_caching

The sites we have running with caching and shopping cart blocks are all running early Ubercart 1 builds. I'm guessing there are a lot of bugs for anonymous users there, but we haven't had any complaints and things seem to be working fine.

I now checked the cart.module in Ubercart 2 and found:

/**
* Theme the cachable shopping cart block content.
*
* @ingroup themeable
*/
function theme_uc_cart_block_content_cachable() {
  return t('<a href="!url">View</a> your shopping cart.', array('!url' => url('cart')));
}

If there is indeed no way to make either cart blocks work properly for anonymous users with caching enabled I think you should change your cached block content.

/**
* Theme the cachable block content - message to user.
*
* @ingroup theme
*/
function theme_uc_pic_cart_block_content_cachable() {
  $output = t('We are sorry, but advanced cart block features are not available for guests with current site settings.');
 
  $attr = array('attributes' => array('rel' => 'nofollow'));
 
  $output .= ' '. t('Please') .' '. l(t('register'), 'user/register', $attr) .' '. t('or') .' ';
  $output .= l(t('login'), 'user/login', $attr) .'.';
  $output .= '<p>'. t('You can also') .' '. l(t('view your cart'), 'cart', $attr) .'.</p>';
 
  return $output;
}

This "We are sorry, but advanced cart block features are not available for guests with current site settings" is something that should only be shown to the site administrators or like I said warned about on the performance page or project page. The customer has no interest in seeing that message.

Also "Please register or login" makes it sound like the customer has to do so for things to work properly. I say just do like the default cart and show a link to view the cart if the user is not logged in and caching is turned on.

#4

This "We are sorry, but advanced cart block features are not available for guests with current site settings" is something that should only be shown to the site administrators or like I said warned about on the performance page or project page. The customer has no interest in seeing that message.

Well, may be. I have an idea to customize the message for this case.

I'll make changes in the module soon (and try to integrate with Ajax Cart).

#5

Is here any advance? This is a real cool and useful modul with a few things that are missed like the anonymous caching.Are there any solutions ?

nobody click here