Forum Moderators: coopster

Message Too Old, No Replies

Any one familiar with Zen Cart

php & mysql scripting to tweak a few things

         

borzoid

2:41 am on Apr 1, 2004 (gmt 0)

10+ Year Member



Hello all, I'm not a programmer and know just enough about php to get myself in trouble. The Zen Cart Shopping cart/store system (an offshoot of OScommerce) is my first experience with mysql.

I would like to get a little help with some tweaks I want to do to my store if anyone is familiar with the workings of this shopping cart.

Thanks

Connie

coopster

4:33 pm on Apr 1, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



...is familiar with the workings of this shopping cart...

Guess not! However, we are familiar with PHP :)

If you are willing to roll up your sleeves we may be able to help you in this forum. You'll have to be a bit more specific about your issues though...

borzoid

11:06 pm on Apr 1, 2004 (gmt 0)

10+ Year Member



Hi Coopster, Thanks for the reply.

What I need in the forum module that was added to the cart is first that it allow characters such as apostrophes and quotations without the user having to escape them. If the user doesn't read the "read me first" message and tries to use these characters they will get an error message and their message is not posted.

The second item I would like is that an email be sent to myself and the other admin when a message is posted.

I don't mind a little hard work and am willing to learn just about anything. Let me know what to do next.

Connie

willybfriendly

11:40 pm on Apr 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>What I need in the forum module that was added to the cart is first that it allow characters such as apostrophes and quotations without the user having to escape them.

That can be taken care of by adding a addslashes() or mysql_escape() function at the appropriate point in the code.

WBF

borzoid

12:08 am on Apr 2, 2004 (gmt 0)

10+ Year Member



Thanks. That sounds relatively easy. I know that there are other places in the site that uses strip slashes. Will have to check out the other tpl files to see where they put that.

borzoid

12:41 am on Apr 2, 2004 (gmt 0)

10+ Year Member



Ok I took a look at the document that defines the forum tables and content. It is full of if's and echos and such to define the content depending on whether the reader is an admin or not or whether the the post has attributes such as sticky or urgent.

Can I put the addslashes at the top of the document to apply to all or will this cause problems.

Connie

willybfriendly

1:56 am on Apr 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Without seeing the code in question (please don't post an entire shopping cart here :)) it is hard to say.

It probably needs to go just before the data is stored in the DB, and stripslashes after pulling it back out of the DB - but this is only a guess.

WBF

borzoid

6:55 am on Apr 2, 2004 (gmt 0)

10+ Year Member



Not sure I could tell where those spots in the code are. If anyone would like to see it I could send the forum module only (fortunately not the whole shopping cart :)).

borzoid