Forum OpenACS Q&A: Errors in ecommerce module
this OpenACS system. I've sort of been lurking on these forums for a
while as I've not had the time to start learning/using the system.
However I finally managed to get it all up and running a few weeks
ago and have been venturing into some of the scripts/procedures to
get a better idea of how it all works and how it should best be setup
for real use.
My first question is has anyone actually used the OpenACS ecommerce
module to setup a test/real site?
I have been trying to understand how it all works and in beginning to
use this particular module, have started to com across problems. I'm
not quite sure whether it is something to do with my setup or if
there is something wrong within any of the current code - so here
- After creating a few user classes (www/admin/ecommerce/user-
classes), if you go back to that page, it should show you the classes
that have just been created, but it doesn't. Looking at the index.tcl
page, it seems that the first select which uses a union to get the
outer join of the ec_user_classes table isn't pulling in the user-
classes that have no users in them. I modified the second select and
it all seems to work now. I'm not sure if anything was wrong in the
first place since I'm still a newbie at this and therefore haven't
put this into the bug tracking system. This is why I'd appreciate
whoever may have already used this module to verify first.
- I'm using the cybercash-stub utility to test complete orders.
However after hitting submit on the last page of the order process, I
get 'Error: Ns_PgExec: result status: 7 message: ERROR: <unnamed>
referential integrity violation - key referenced from
ec_customer_serv_interactions not found in users' - this seems to be
coming out of a sub-procedure (ec_customer_service_simple_issue ?)
when the system tries to email the order confirmation back to the
customer. The proc is sending an empty string in as
customer_service_rep which fails on the ref. integrity with the users
table as there are no null user_id records. Am I even on the right
track here? If I comment out the 'ec_email_new_order $order_id' line
in www/ecommerce/finalize-order.tcl, then the order seems to be
entered fine (without the person getting a confirmation email of
Second question - apart from 'the book', the problems sets, and the
myriad of aD documents, does anyone have good suggestions/other links
to help newbies to come upto speed with the whole system?
should definitely report them on the bug tracker. The second bug
you're seeing probably comes from the early days of the
ecommerce module used on 6.5.3 without referential integrity
checking, and the first is just a stupid bug.
Ecommerce is a huge module that unfortunately doesn't get
tested enough because of its largeness. If you have the time to
test it more and report bugs, that would be great! I would like to
focus some time this weekend on cleaning up ecommerce, so
go crazy with the SDM :)
The second bug probably stems from either of these:
<ul><li>Postgres doesn't allow one to pass NULLs into PL/pgSQL functions, weird things happen if you do
<li>Oracle very incorrectly treats the empty string '' as a synonmym for NULL. Postgres correctly treats it as, well, the empty string. This is a subtle porting issue that's easy to overlook when one hacks through the code modifying queries.
Take your choice. Maybe it's a combination of both.
I have been bulk uploading some products, categories and product-category map information using the upload scripts and csv files. However any products that are imported in instead of being entered individually and manually (via the admin/ecommerce/products/add.tcl pages) just do not get found by the default search tool on the product pages. I have looked at the tables and all the data is definitely there and I can find products using a LIKE search. It seems the pseudo_contains procedure is not matching the search string with any products even though it seems it should. I have looked at add-4.tcl to see what might be different about entering a single product rather then importing a load of them from a csv file but there doesn't seem to be anything out of the ordinary. Any info on this will be much appreciated!
Then we can take a look and it won't get forgotten.
Then we can take a look and it won't get forgotten.
I'm glad we have a real user of e-commerce, it's a great help uncovering bugs even if you don't figure out how to fix them on your own.
ERROR: ExecAppend: Fail to add null value in not null atribute product_idAnd in the browser window...
FAILURE! SQL: insert into ec_products (creation_date, available_date, dirname, last_modified, last_modifying user, modfied_ip_adress) values(sysdate(), sysdate(), '', sysdate(), 4,'192.168.10.150')The CSV file was generated by Excel to test the system with. I tried loading the CSV from a windows box, and it spat out the file 'Cannot read file'. I created a sample csv file with VI, and it too was rejected.
I have played around with the format of the CSV file, tried inserting '''s around the values, etc., all to no avail. Does anyone have any ideas?
Ps I'm using the latest ACS (which is excellent btw!!!), the lastest postgres, and the latest AOLserver.
Our CSV looks has the following format (I am going with getting the most basic configuration up and running first)....
product_id, product_name, price ACC-CAB-1002,PARALLEL PRINTER CABLE - 3.0M,3.5Am i missing something here?
I can add products one at a time with no problems, its just the bulk upload that's giving the problems. I'm going to go through the docs again step by step to see if I missed anything that could be causing the problems....<p>
I am wondering if anyone has succesfully managed to play do a bulk upload, it certainly sounds like Piyush has it working in some way....<p>grant
I did manage to do a few bulk uploads but have not really had time to continue working with/testing the ecommerce module recently. Unfortunately I don't have access to my test system just now, but it looks like the product_id needs to be an integer (check out the table definition in www/doc/sql/ecommerce.sql). Also another problem I had encountered was something to do with the ns_queryget csvfile not working with nsd8x and I had to run the nsd76 aolserver instead. Hope this helps. I'll be able to look at specifics on my own setup tomorrow if you have any other questions. I had also created additional pages to help bulk upload the categories and subcategories that I can send you if you like.
I would be very interested in your additional pages, and thanks for the offer. It is nice to know that some others are working seriously with the ecommerce module. I would be most happy to share any learning and tips and tricks we pick up as we start to rigorously put this module through it paces over the next month or so...
I've been bitten by a bug in AOLserver 3: ns_getcsv doesn't work. The ecommerce module (at least in ACS Classic) uses ns_getcsv.
I posted a http://www.arsdigita.com/bboard/q-and-a-fetch-msg.tcl?msg_id=0007mN question about this bug in the photo.net bboard, and a guy responded with a patch that mostly works, at least for 3.0RC2.
Maybe that will help you out...