Revision: 3822
Author: hans
URL: http://bknr.net/trac/changeset/3822
Update shopping data structures, not yet a lot to see here.
U trunk/projects/quickhoney/src/packages.lisp
A trunk/projects/quickhoney/src/quickhoney-shop.lisp
U trunk/projects/quickhoney/src/shop.lisp
Modified: trunk/projects/quickhoney/src/packages.lisp
===================================================================
--- trunk/projects/quickhoney/src/packages.lisp 2008-09-06 16:34:27 UTC (rev 3821)
+++ trunk/projects/quickhoney/src/packages.lisp 2008-09-06 16:36:42 UTC (rev 3822)
@@ -17,6 +17,12 @@
:quickhoney.config)
(:export))
+(defpackage :shop
+ (:use :cl
+ :bknr.datastore
+ :bknr.indices
+ :bknr.user))
+
(defpackage :quickhoney
(:use :cl
:cl-user
@@ -40,7 +46,12 @@
#:quickhoney-image
#:quickhoney-image-client
#:quickhoney-image-spider-keywords
- #:startup))
+ #:startup
+ #:quickhoney-image-category
+ #:quickhoney-image-subcategory
+ #:all-categories
+ #:subcategories-of
+ #:images-in-category))
(defpackage :quickhoney.tags
(:use :cl
Added: trunk/projects/quickhoney/src/quickhoney-shop.lisp
===================================================================
--- trunk/projects/quickhoney/src/quickhoney-shop.lisp (rev 0)
+++ trunk/projects/quickhoney/src/quickhoney-shop.lisp 2008-09-06 16:36:42 UTC (rev 3822)
@@ -0,0 +1,12 @@
+(in-package :quickhoney)
+
+(define-persistent-class quickhoney-product ()
+ ((image
+ :update
+ :type (or quickhoney-image null)
+ :index-type hash-index
+ :index-reader products-for-image
+ :documentation
+ "Image that this product is related to, or nil for standalone products"))
+ (:documentation
+ "Mixin class for Quickhoney products, which are usually related to a QUICKHONEY-IMAGE"))
\ No newline at end of file
Modified: trunk/projects/quickhoney/src/shop.lisp
===================================================================
--- trunk/projects/quickhoney/src/shop.lisp 2008-09-06 16:34:27 UTC (rev 3821)
+++ trunk/projects/quickhoney/src/shop.lisp 2008-09-06 16:36:42 UTC (rev 3822)
@@ -1,4 +1,4 @@
-(in-package :quickhoney)
+(in-package :shop)
;; Shopping system.
@@ -24,11 +24,18 @@
:type money
:documentation
"Price of the product, not including any taxes.")
- (image
+ (name
:update
- :type (or quickhoney-image null)
+ :type string
+ :index-type string-unique-index
+ :index-reader product-with-name
:documentation
- "Image that this product is related to, or nil for standalone products")))
+ "Short name of the product, must be unique, should be identifier")
+ (description
+ :update
+ :type string
+ :documentation
+ "Textual description of the product")))
(defgeneric sell (product)
(:documentation
@@ -47,7 +54,7 @@
address. Once paid, the system makes the product available to the
customer for download."))
-(defgeneric stock-count ((product download-product))
+(defmethod stock-count ((product download-product))
nil)
(define-persistent-class emailable-product (product)
@@ -58,12 +65,13 @@
be supplied by the customer. Once paid, the system sends the
order to the store personnel for fulfillment."))
-(defgeneric stock-count ((product download-product))
+(defmethod stock-count ((product emailable-product))
nil)
(define-persistent-class mailable-product (product)
((stock-count :update
:type integer
+ :accessor stock-count
:documentation
"Number of instances of this product that are available to be sold."))
(:documentation
Revision: 3819
Author: hans
URL: http://bknr.net/trac/changeset/3819
Fix for images with non-URL characters in their names.
Split styles for non-JS image browser into separate file.
Clear previous image when entering directory in order to reduce spurious
image exposures.
A trunk/projects/quickhoney/website/static/image-browse.css
A trunk/projects/quickhoney/website/static/index.css
U trunk/projects/quickhoney/website/static/javascript.js
A trunk/projects/quickhoney/website/static/quickhoney.css
D trunk/projects/quickhoney/website/static/styles.css
Change set too large, please see URL above
Revision: 3818
Author: ksprotte
URL: http://bknr.net/trac/changeset/3818
whitespace / indent datastore/src/data
U trunk/bknr/datastore/src/data/blob.lisp
U trunk/bknr/datastore/src/data/convert.lisp
U trunk/bknr/datastore/src/data/encoding-test.lisp
U trunk/bknr/datastore/src/data/encoding.lisp
U trunk/bknr/datastore/src/data/json.lisp
U trunk/bknr/datastore/src/data/object-tests.lisp
U trunk/bknr/datastore/src/data/object.lisp
U trunk/bknr/datastore/src/data/package.lisp
U trunk/bknr/datastore/src/data/tests.lisp
U trunk/bknr/datastore/src/data/txn.lisp
U trunk/bknr/datastore/src/data/xml-object.lisp
U trunk/bknr/datastore/src/data/xml-tutorial.lisp
Change set too large, please see URL above
Revision: 3817
Author: ksprotte
URL: http://bknr.net/trac/changeset/3817
(deftransaction CHANGE-SLOT-VALUES ...) had been split into
(defun CHANGE-SLOT-VALUES ...) and (defun TX-CHANGE-SLOT-VALUES ...) in
http://bknr.net/trac/changeset/3037 to produce a warning only when
CHANGE-SLOT-VALUES is called (it is deprecated), whereas
TX-CHANGE-SLOT-VALUES is properly used in (SETF SLOT-VALUE-USING-CLASS).
I dont understand the reason for deprecating change-slot-values AND
making it at the same time non-functional. It is still used by BOS
e.g. in edit-sponsor, so I changed it to still produce a warning, but
be functional again.
U trunk/bknr/datastore/src/data/object.lisp
Modified: trunk/bknr/datastore/src/data/object.lisp
===================================================================
--- trunk/bknr/datastore/src/data/object.lisp 2008-09-05 16:25:53 UTC (rev 3816)
+++ trunk/bknr/datastore/src/data/object.lisp 2008-09-05 18:10:54 UTC (rev 3817)
@@ -716,12 +716,11 @@
(defun change-slot-values (object &rest slots-and-values)
"This function is the deprecated way to set slots of persistent
objects."
- (declare (ignore slots-and-values))
(warn "CHANGE-SLOT-VALUES is deprecated - use WITH-TRANSACTION and standard accessors!")
(execute (make-instance 'transaction
:function-symbol 'tx-change-slot-values
:timestamp (get-universal-time)
- :args (list object))))
+ :args (list* object slots-and-values))))
(defmethod prepare-for-snapshot (object)
nil)