Forums / Developer / Shopping basket restriction::annoying

Shopping basket restriction::annoying

Author Message

Sy Hai Dang

Wednesday 19 May 2004 10:02:11 am

Hi,

I am trying the eZ publish 3.4 beta 1 release.
An annoying warning "Access denied" shows up whenever we add a product to our basket by clicking the button "Add to basket" while we are not logged into the site.
Please tell me how to allow the anonymous user to add as many products to the basket as possible without any login requirement and the anonymous user is only required to login when he does the checkout.

In the Administration Interface, I have tried to create a new role policy for the anonymous user with various modules and functions but still could not work it out.
The anonymous user is still required to login when he tries to "View all details" of the "Shopping basket". Annoying behaviour of the shopping cart!

bisk

Wednesday 19 May 2004 12:30:38 pm

It works here after adding a new anonymous role policy for the shop.

I've added this policy to anonymous: module->shop, function->buy, limitations->*

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

Dominik Pich

Wednesday 19 May 2004 12:41:11 pm

Add PolicyOmitChecking[]=/shop/basket to your site.ini append under RoleSettings]

Sy Hai Dang

Thursday 20 May 2004 6:21:44 am

Thank you bisk and Dominik Pich but I was unsuccessful with your suggestion.

There is a strange thing happened after creating a new anonymous role policy:

Role edit Anonymous
Module: shop
Function: buy
Limitations: *

The strange thing is when I accessed the Role policies list, I could not see the new role that I had created (shop buy *)

Role / Anonymous
Role view
Role policies
Module Function Limitation
--------------------------
user login *
content read Section( Standard section )
content pdf Section( Standard section )

but when I click the Edit button to jump to the "Role edit Anonymous" page I found the role policy which I had created (in the Current policies table):

Role / Anonymous
Role edit Anonymous
Current policies
Module Function Limitations Edit Delete
---------------------------------------
user login *
content read Section( Standard section )
content pdf Section( Standard section )
shop buy *

I tried to clear "All caches" several times in the Cache-admin but the problem still remained.

The result was that after creating the new anonymous role policy and clear all caches the anonymous user was still asked to login each time they added a product item to the shopping cart (click the button 'Add to shopping cart' leads to the page index.php/shop/shop/basket).

I could not find the string "RoleSettings" in all of my site.ini files.
I found in the file doc/changelogs/2.9/CHANGELOG-2.9-6 the following notes:

index.php:
- Policy check omit list was moved to site.ini under RoleSettings and added support
for setting a module/view pair.

But I could not find the RoleSettings in the site.ini of the eZ publish 3.4 beta 1 and beta 2.

Anyone can help?

Sy Hai Dang

Thursday 20 May 2004 6:31:07 pm

Hello bisk
Thank you for your help. Your suggestion of creating a new anonymous role policy worked for me when I restart the server. Might be something wrong with the caching?

eZ debug

Timing: Jan 18 2025 19:19:44
Script start
Timing: Jan 18 2025 19:19:44
Module start 'content'
Timing: Jan 18 2025 19:19:45
Module end 'content'
Timing: Jan 18 2025 19:19:45
Script end

Main resources:

Total runtime1.0795 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.7344180.8281
Module start 'content' 0.00580.9242 768.5625572.4063
Module end 'content' 0.93000.1494 1,340.9688338.0938
Script end 1.0794  1,679.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.3588210.0002
Check MTime0.00140.1304210.0001
Mysql Total
Database connection0.00070.064510.0007
Mysqli_queries1.002192.83442020.0050
Looping result0.00200.18372000.0000
Template Total1.052397.520.5262
Template load0.00260.239520.0013
Template processing1.049797.242320.5249
Template load and register function0.00020.020010.0002
states
state_id_array0.00100.088510.0010
state_identifier_array0.00190.173320.0009
Override
Cache load0.00240.2232520.0000
Sytem overhead
Fetch class attribute can translate value0.00250.229840.0006
Fetch class attribute name0.00120.113050.0002
XML
Image XML parsing0.00070.065540.0002
class_abstraction
Instantiating content class attribute0.00000.001350.0000
General
dbfile0.00220.2078210.0001
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs