Nevermind, I found the
<?php
if ( $detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ) {
echo '<div class="header Fixed"><a href="#menu" title="Menu"><i...
Type: Posts; User: RobertH
Nevermind, I found the
<?php
if ( $detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ) {
echo '<div class="header Fixed"><a href="#menu" title="Menu"><i...
Zen Cart v1.5.6a
PHP v7.2.4
Our company is creating a new look for our website based on Zen Cart's Responsive Classic template. In the new design there is a hamburger menu that is...
Ah okay, that makes sense. That works fine!
What about overrides to files in /includes/functions/ or /includes/classes/? I found this thread from 2009 where a user advises to create an override in...
I know about adding additional defines to filenames in /includes/extra_datafiles/ but what if I need to override a define already existing in /includes/filenames.php? Can I do so without editing the...
I didn't see anything for xsell in extra_definitions, but includes/languages/english/[template]/ has a file called xsell_products.php.
EDIT: Nevermind I found multi_xsell_defs.php in the root...
I found a definitions file for mxsell in 'extra_datafiles', and since I couldn't see an option to define the "heading" in the admin interface of zencart I just added a definition to that file.
Yea I looked in places I thought other constants for Multi Cross-Sell would be defined but haven't found them yet. The line it's referring to obviously accounts for multiple multi-cross sell "tables"...
I removed the return before the $db line and added return TRUE; to the _sess_destroy ($key).
I haven't noticed any new errors (that weren't present in some form before the changes I made to...
Thank you for the suggestions - I'm going to try to get the project of updating ZenCart onto the To-Do list.
I've applied the updates listed above, I'll have to get back to you on what the error...
This problem looks to be appearing in error logs as far back as I have access to. I don't think it was sudden/overnight, and if it was, I wasn't around for the incident that may have caused it.
I...
ZC v 1.5.0
PHP 5.3.5
There are many instances in my php error logs (/cache/myDEBUG-######-#####.log) that look like:
[01-Jan-2017 01:10:24] PHP Warning: require(): open_basedir restriction...
I like the pulling from $this->extensions solution better :P
It'd be harder to have to define it to affect every page.
Well my upload.php uses this:
if ($this->message_location == 'direct') {
$messageStack->add_session('header', ERROR_FILETYPE_NOT_ALLOWED . ' ' . UPLOAD_FILENAME_EXTENSIONS, 'error');
}...
Also, how can I change the messageStack error that lists the allowed filetypes?
upload.php has this:
if (!zen_not_null($extensions)) {
if (!defined(UPLOAD_FILENAME_EXTENSIONS)) define...
So I tried "... && $apply_attachment->set_filename($apply_attachment->filename . "_" . date('Md-y_H-i-s')) && ..." like you suggested DrByte, but it didn't work.
I attempted a version based on...
It's going great, thanks again guys!
I'm trying to append a timestamp to the user's filename with this code:
if ( $apply_attachment->parse() && $apply_attachment->save() ) {
if...
Okay, thank you very much @DrByte and @mc12345678. I read through your replies and I'm trying to wrap my head around it all. I'm not very good with PHP and especially class/object oriented PHP so...
Okay, so the attachment is getting uploaded.
I tried sending attachments_list to zen_mail like this:
zen_mail($send_to_name, $send_to_email, 'Career Application Submitted', $text_message,...
Yea I've changed the set_destination to DIR_FS_UPLOADS and am using the .jpg file. I agree that it's unusual to "have to" include the class specifically, but it seems to have at least done something....
UPDATE:
So after the success in uploading the file with the product attribute, I was looking at classes/shopping_cart.php and where it uses the upload class. I saw that it has...
I followed those steps and was able to add the test product to the cart after uploading the file. It said "File saved successfully" and I found the file in httpdocs/images/uploads/ (albeit it being...
Trying a .jpg yielded the same result. Do I need to use "$apply_attachment = new upload($_POST['attach']);"?
The problem is somewhere in the use of the upload class and/or use of...
I was using the images directory as a product of working from the foundation of manufacturers.php. I figured that if that was a directory already setup to accept uploads then it would be a good place...
I tried hard coding the path mainly for troubleshooting the set_destination statement, I'm now using
$apply_attachment = new upload('attach');
$apply_attachment->set_destination(DIR_FS_CATALOG ....
Thanks again mc for your reply.
I used DIR_WS_IMAGES because DIR_FS_IMAGES isn't defined (on the non-admin side anyway). I tried just explicitly entering the path but that didn't work either, so I...
I was using $attachment as seen in that post, but I then renamed the variable to $apply_attachment to be more specific in case the general $attachment was used elsewhere and would cause a conflict....
Sorry - missed the edit window. I was going to add -
EDIT:
Do I set the "$attachments_list[] = $apply_attachment->file;" in the header.php of the form page, where the other php code I'm using is?...
Oops. Sorry I actually did miss it. Thanks for taking the time to look into it.
Do you mean one file at a time? Because that's okay, the user should only be able to upload one file [per form...
@mc12345678 Thanks for posting!
I'll give it a try with the appropriate definitions and try to look more into the zen mail attachments.
Thanks again for the advice.
I can't get the attached file to be uploaded.
I took the attachment parameter out of the zen_mail call for now, I figured I should tackle getting the attachment to upload successfully and then...
Thank you for the quick advice!
When you say a readable location on the server, can it be deeper than the root directory? I've had problems before trying to serve files that weren't in the root.
...
Sorry to necro this thread, the project it's related to got tabled for a while due to more pressing matters and I'm now revisiting it. I'm actually not even sure if posting this right now will...
ZC Version: 1.5.0
PHP Version: 5.3.5
I'm trying to use the zen_mail function to send information and file(s) attached with an html form to a specified email address. The form is pretty much as...
Thank you dbltoe and DrByte for your responses.
DrByte: I tried your suggestion since it didn't involve cloning a shipping module. The only variation I had to make was that it seemed like I needed...
ZC version: 1.5.0
PHP version: 5.3.5
The problem I need to solve is this: Our store needs to comply with sales tax laws for both Illinois and Massachusets. Specifically, in Illinois the cost of...
Oh well the 'GET' is successful after I used dataType:'json', but I don't know how to request specific methods or tell the request that it should use the customer's address for the "Address...
Okay well the error was from me setting the dataType incorrectly :unsure:, so the 'GET' is successful with dataType:'json'. But I don't know how to use methods or whatever to actually request...
So I found and got an access key for a UPS API kit that can check for residential or commercial address status based on UPS standards: https://www.ups.com/upsdeveloperkit/downloadresource?loc=en_US
...
This thread contains the backstory to what I'm trying to accomplish: https://www.zen-cart.com/showthread.php?219741
I'm trying to use this API from UPS' developer tools:...
I did try this in my first iteration of the addition, and it didn't work either. I figured that I should move it to a "further along" page because the data from the shipping form isn't technically...
So recently we have made a change to always require a signature upon shipment arrival because of too many lost shipments by carriers. The modification I am trying to make to the shipping page (and...
Seems to be running smoothly on the live site with http or https!
Thanks again for your advice. I will report back here how it goes when moving the feature to the live site
I've thought of a possible issue and I don't know if it is already accounted for based on this setup of the XHR POST.
Right now, as you've seen, I'm working on a test site on localhost, but my...
Well after initial testing and breif spot-checking for consistency across pages it seems to be working with the redirect line intact, thank you!
If it's not too much to ask, could you maybe try to...
Doesn't the whole $_SESSION [] variable need to be out of quotes to specifically *not* be treated as a string?
I will try this tommorrow as I'm leaving work right now. Thank you for your responses...
I changed the .load() line to what you suggested and added "<script type="text/javascript"> ... </script>" header and footer. Then I renamed it as .php. When trying the page again after this the...
I was going to post the full HTML rendered from Chrome Inspector Tool but I didn't know how to control the size of the "[HTML]" Tag box and it was rather large as-is.
The contents of...
Request Header Source with zen_redirect left in:
GET /page_not_found.html HTTP/1.1
Host: localhost
Connection: keep-alive
Accept: text/html, */*; q=0.01
X-Requested-With: XMLHttpRequest...
Sorry to double post but when I tried to use "Edit Post" the edit screen had an empty box where the existing source for the post should be :lookaroun
Just after posting I noticed something about...