I am writing some custom code that requires communication with the db. In my functions I use: global $db; but I keep getting 'scolded' on programming forums for using globals.
Is there a better...
Type: Posts; User: makenoiz
I am writing some custom code that requires communication with the db. In my functions I use: global $db; but I keep getting 'scolded' on programming forums for using globals.
Is there a better...
Should I sanatize SELECT and DELETE statements as well using bindVars and placeholders?
Also the problem that I was having above was that the now() should not have been in the bindVars...
Thanks for that... date coming in as 0000-00-00 00:00:00 but at least its writing to the table. Ill work on it a bit and report the fix if I find.
Thanks
Thanks! Ill fix and get back with result.....
This is holding it up.... any idea why?
$sql = $db->bindVars($sql, ':products_dateAdded',now(), 'date');
Can I use now() in the statement?
Just tried with using the example in the developers documentation located at: http://www.zen-cart.com/wiki/index.php/Developers_-_Database#BindVars_Datatypes
and it worked so it must be my code...
Hi Dr Byte,
my data is coming from a data feed using simpleXMLElement. My data is coming in fine as I am echoing it and I can see its ok but my function is halting when it hits the $sql statements....
Thank you very much.
ZC 1.5.1
Im adding some data to a new table I created within zencart. Im tring to become better at protecting against injections and just need a quick look over ( Im still newish and solid...
Yes I try very hard to stay away from 'c'! Our upgrades right now take 2 days and BeyoneCompare is my very very best friend during those 2 days! But the boss is the boss .. ya know.. I dont think 'a'...
Im on a development server not accessible to the public... but they are basically 1 mit and 1 baseball both from the same category of 'baseball' which is a sub category of parent cat 'sports'. There...
1.5.1.
Lots and lots of customizations ;}
I am doing some custom coding and coding a link such as this:
mysite.com/index.php?main_page=products_new&action=buy_now&products_id=107230
It...
Ok found the solution to the browser display problems. I have an override english.php file that still was using define('CHARSET', 'iso-8859-1'); so I changed to
define('CHARSET', 'utf-8');
...
Ran the conversion program and all tables and db are now utf8 but if I add degree symbol directly into the database products_descriptions I get this: ° instead of this ° for the degree symbol.
so...
Im going to update this thread as I proceed in the event it can help any one else.
My config files do show UTF8 and my Lang shows UTF-8
admin/includes/configure.php = define('DB_CHARSET',...
Thank you both for your relies. Greatly appreciated. I will look at the links
lhungil sent . And torvista, I tried openoffice last year. its was soooo slow that I had to get rid of it. My patience...
We are importing our products, not using an editor so text is going directly to db from a csv file. Our descriptions are getting truncated at the degree symbol. Is this a character set...
I have found the cluprit: / includes/templates/myTemplate/html_header.php
<script type="text/javascript" src="https://info.template-help.com/files/ie6_warning/ie6_script_other.js"></script>
Thier...
Nope - nothing. Ive searched the DB as well... ;( Im thinking its encoded but I have yet to find any encoded code. Thanks for the try though! I appreciate it.
1.5.1
We use theme407 template which I believe came from Template Monster ( previous developer ). I cant get the site completely secure because its making two hidden calls to...
Great thank you for the response. I had them install the extension any way... should be there..
Thanks again.
Ive been digging around doing some clean up and came across a php.ini file in home/myACctName ( not web directory)
it has:
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so...
Answered my own question with tests.
1) No as long as products are active, then they show up in the linked cat
2) Yes
...... ;)
ZC 1.5.1
Have products loaded into one top category, then dispersed into linked categories as follows.
Top Cat: ACME Outdoor products
item1: fishing pole
item 2: tent
item 3: backpack
...
Great... will install tonite!
zc 1.5.0
We have an automation script that populates our store from a remote feed. It brings in 1 image per product from the remote server and puts them in a directoy ( we define which directory)....
Sorry you are correct... depreciation of mysql_connect is irrelevant since Im using 5.3.16.
What other ideas might you have for excessive mySQL connections? Someone suggested this to help with...
Also mysql_connect is depreciated.
http://php.net/manual/en/function.mysql-connect.php
Is it inefficient? Could this be why Im having an excess of connections? Thanks for any help.
Zen Cart: 1.5.1 35K products. Auto updating of 1-20
products every 10 hours via cron.
PHP version 5.3.16
MySQL version 5.1.62-cll ...
ZC 1..1
I am looking to remove orphaned images or at least create a list. Can IH help with that? Dont want to install before Im sure.
THanks
ZC 1.5.1
Simply trying to removed unused (products no longer active) images from my server. Is this the correct Add - on. I use 1.5.1 I have 18K products and 100K images. Something is wrong and I...
We are looking for a better way to handle newsletter sign up for guests that would create an account for them at the same time. Im thinking there is nothing out there so looking at a mini...
Hi I think the answer may be buried in this thread but I cant find it.... If using the sidebox for newsletter sign up, will a zencart profile be created if First and Last name Field inputs are...
Thanks very much ;)
Hi Yes, Ive unzipped the files, but never sure if a file is created through install process... I do see the root/includes/functions compat file so I assume its still part of the file system. ;) But...
but the main compatibility file should still remain / root/includes/functions?
Thanks!
Was admin/includes/functions/compatibility.php file removed in 1.5.1 (the file in admin not in root) . I have one hanging around and Im not sure if another add on has put it there or if its part of...
So if anyone runs into this, this is the anti hotlinking code to use if you are using an add on domain (replace the domain names with yours! )
## dissallow hotlinking
RewriteEngine on...
Fresh install and same thing. I removed the following hotinking code from my htaccess and viola ! Images! I was hotlinking to myself ;) Keep in mind that this .htaccess file is located in the main...
Will do thanks again.. Will post outcome.
hmmm, that didnt do it. Now I get the new installation page.... Thanks for trying ~!
I created the add on account, server created the add on directory. I manually edited the ZC config files to accommodate the the new directory. Would that not be the correct path for an add on...
A correction
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
not
define('DIR_WS_CATALOG', '/myaddondir/');
1.5.1 New store, No products, No mods. Yes, I have read all the other posts that have been made but none solve my issue.
I have created an add on domain called myaddondomain.com (theoretical) to...
No that is the problem ;)
THanks!
This is a great question. Id like to know if something has been put into place in 1.5.1 to handle this as well?
Thanks
1.5.1 lightly modified.
Need to apply table shipping module if products.product_model begins with ABC_ . If not Id like to apply our standard shipping method of UPS.
Any pointers would be...
Wow - just found it: http://www.zen-cart.com/content.php?309-upgrading-addons-for-compatibility-with-v15x
I notice in 1.5.1 admin/includes/boxes has been removed. I have a script whos developer is MIA and I need to deal with one of the files located in 1.3.9h /admin/includes/boxes.
Where were the...
Thanks.... just didnt want to crash my entire upgrade due to a small typo...
thanks for the confirmation.