Displaying 20 results from an estimated 20000 matches similar to: "re: Maintaining same session for a user across"
2006 Jun 20
3
Maintaining same session for a user across different PCs
Hi,
I''m trying to make a simple shopping cart, where I want to maintain
state when a use logs in from different location. Consider the
following :
1. ''foo'' logs in from home pc and add ''bar'' item to the cart.
2. ''foo'' goes to office and logs in from office PC.
3. Now I want only one session for ''foo'', so that when
2009 Oct 28
0
Specific routing problem
I am implementing a system for users to easily create a small shop for
themselves. And I''ve run into a route problem.
NOTE: I''ve removed a lot from my route.rb file, since I want focus on
this particular problem. :-)
I currently have a route.rb like this:
ActionController::Routing::Routes.draw do |map|
map.resources :shops do |shops|
shops.resource :cart, :member => {
2005 Dec 13
3
Forcing the session-id
We''re going to have problems keeping cookies across domains. We want
people to shop in one domain (e.g. "booksareus.com") and then checkout
on the same server securely under a different domain (e.g.
"greatbooks.com"). When we make the jump to the secure domain (the
checkout link) can we submit the user''s session ID along with it and
have it
2006 Apr 18
1
''depot''app, trouble with session / cookies
Many of you probably know the ''depot'' app from the ''Agile Rails
development'' book.
When the view changes from ''Store'' to ''display_cart,'' a session
containing the shopping-cart (:cart) is supposed maintain the ''cart''
between calls, but when the display_cart stub view shows up, I have
always ZERO elements
2006 Jun 27
5
Rails cronjob?
I want to be able to write a script in Ruby which regularly consumes an
XML feed from a fixed source, re-formats it, produces a large file for
web delivery, and updates a database with the contained information.
It''s simple - just running a script from a cron job, and some basic data
manipulation... But I''d prefer to use the Rails database mapping
constructs than roll my
2005 Jul 06
4
Bug in shop demo
http://script.aculo.us/demos/shop if you drag an item from the product
list straight to the droppable area to remove an item from the cart,
it''ll still add it to the cart.
-PJ
2005 Mar 06
12
Where to place custom classes?
Hi all,
I am writing a simple shopping cart which will consist of a single
class. There will be no DB table for carts so I do not want to make my
Cart a model. But where do I place my Cart class so that I can access
it in my controllers?
I want to be able do do things like this (for instance in a shop
controller):
def add_to_cart
@session[''cart''].add(article_id, amount)
2009 Feb 27
1
Maintaining session data across multiple domains
I''m working on an application that can be accessed from multiple
domains. I want to maintain session data across these domains, such
that if a user logs in at www.domain1.com, then moves to www.domain2.com,
they will still be logged in with the same account. Is this possible
in Rails? Could anyone point me towards a guide of how to achieve it?
Many thanks,
Adam
2005 Dec 25
2
[repost] newbie questions
Hi all,
I''m following the shop example in ''Agile Web Development with Rails''.
I would like to extend the checkout screen, in such a way people can change
the number of items they have selected in there cart.
In my controller I have:
def checkout
@cart = find_cart
@items = @cart.items
if @items.empty?
2005 Dec 14
9
Passing quantity in a shopping cart
I am using this line on my index.rhtml page to capture the quantity
required of a particular item for a basic shopping cart app:
<%= text_field ''line_item'', ''quantity'', {:size=>3} %> </td>
but my next screen (a cart screen) doesn''t reflect what was entered in
that text field when the item is added to the cart. That is,
2006 Sep 03
2
Undefined method "xxx" of a model when calling a helper
Hi all
I''m creating a shop page. I have a cart model that looks like the
following:
class Cart
attr_reader :line_items
def get_line_item id
@line_items.each do |l|
return l if l.id == id
end
end
def initialize
@line_items = []
end
def empty!
initialize
end
def empty?
return true if @line_items.empty?
false
end
end
And I have some
2007 Aug 05
0
Newbie - Question on Parent child updating
All,
I''ve just started Rails and Ruby a week or so ago. Please forgive me
for my ignorance. I started writing a small test application to test
some of my new knowledge and have hit a wall. Would like some best
practices.
I have 3 tables, as below...
CREATE TABLE `carts` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`quantity` int(11) NOT NULL,
PRIMARY
2006 May 16
2
Good and Bad Experiences with Hosting Companies
I''m about to get hosting for an on-line shop application in the UK. I''m
leaning towards Bytemark, as they seem to have the right product range
and attitude. Support sound knowledgeable and helpful and they show a
marked preference for Debian, which I happen to be fond of.
Has anyone tried them? Has anyone had good or bad experiences with other
hosting companies
2005 Dec 23
0
newbie question
Hi all,
I''m following the shop example in ''Agile Web Development with Rails''.
I would like to extend the checkout screen, in such a way people can change
the number of items they have selected in there cart.
In my controller I have:
def checkout
@cart = find_cart
@items = @cart.items
if @items.empty?
2012 Sep 25
1
minor swap issue ....
.... I have a CentOS 5.n VM running on a Fedora 14 server/host,
installed using virt-manager, pretty plain vanilla. I use it to compile
binaries to run under RHEL/CentOS 5.n OS. I occasionally notice that
when the VM gets paged out by the server, it takes several minutes to
get it back in :-/ (see below).
On the host, logged in to a shell through a terminal window, this A.M.:
[wam at Q6600,
2008 Oct 28
5
Page does not seem to be reloaded on prod server
Hi all
I''ve coded a small shop that works well on my dev machine (OSX 10.5).
But look at the following page:
http://shop.incense.ch/compact_discs/1
When clicking "Reservieren", the page is forwarded to a new page, where
the product is added to the shopping cart, and a flash notice is
prepare. Then the page is redirected back to the shop page.
On my dev machine this works
2006 Jan 09
6
drag and drop problem
I am working on a resource planning problem. I like to use a nice drag
and drop interface for that. E.g. have a box of persons and a box of
projects, now I would like to assign a persom to project by dragging it
from the available resources box to a recieving project box.
I have studied the amazing drag and drop shopping card code listed here
http://demo.script.aculo.us/shop
What I need to
2006 Mar 07
11
maintaining application state/urls
Hi All
Not specifically a scriptaculous question, but I was wondering how
people were going about maintaining access to their applications via
standard urls.
Say for example I''ve a shop at www.shop.com, and its pure ajax to load
in products. Now customer A wants to show a friend a product on the site
- giving him the url www.shop.com and telling him to click on a series
of links
2006 Apr 16
9
''depot'' app, where''s session?
Many of you probably know the ''depot'' app from the ''Agile Rails
development'' book.
I have constructed the ''products'' model, the Store-controller, and the
''Cart'' and ''Line Item'' classes. I have told Application-controller about
:cart and :line_item:
model :cart
model :line_item
Here''s part of
2006 May 08
5
The true merit of non-memory based session stores
All,
There is an assertion in AWDWR that the in-memory session store is "too
simplistic."
However, I find myself nudged in this direction by the need to keep a
non-serializable model attribute available in my session and the
relative pain of implementing either a custom serialization scheme for
the model in question (or a custom caching mechanism so that I can store
my attribute