Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2008
    Posts
    45
    Plugin Contributions
    0

    Default Need my website Header, Footer and Sidebar on a form webpage, that I've just created

    Hi
    I'm using Zen Cart 1.5.4

    I've just created a form for entering a competition on my website. Could anyone tell me how I get the Header, Footer and Sidebar from my website to show on this new page, please? Is it a just a case of putting my .php files and .css file in a specific directory (if so, could you tell me where that is), or is it more complicated than that please? Any help would be greatly appreciated!
    Thanks

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Need my website Header, Footer and Sidebar on a form webpage, that I've just crea

    Quote Originally Posted by suedouglas View Post
    I've just created a form for entering a competition on my website.
    Please explain more:
    Did you create this "form" by opening a text file on your computer and typing in all the relevant HTML to provide all the input fields etc and upload that HTML file to your server? Or did you do it in a PHP file?

    Or did you create this form with some 3rd-party service, and now you're wanting to make "their" form look like "you"?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Need my website Header, Footer and Sidebar on a form webpage, that I've just crea

    Quote Originally Posted by suedouglas View Post
    Hi
    I'm using Zen Cart 1.5.4

    I've just created a form for entering a competition on my website. Could anyone tell me how I get the Header, Footer and Sidebar from my website to show on this new page, please? Is it a just a case of putting my .php files and .css file in a specific directory (if so, could you tell me where that is), or is it more complicated than that please? Any help would be greatly appreciated!
    Thanks
    So basically, you have created either a new page, or you have created an ez-page. By that I mean, you should follow the instruction for adding a new page to your site or how to use EZ-pages (suggesting the first more than the second because you are wanting to retrieve/use the data). Alternatively you could have possibly used a product with attributes to collect your data, though that requires going through the checkout process in order to obtain/keep the data instead of obtaining the data like when submitting a contact us form.

    So, the wiki has a good article on what is needed to create a new page (basically surrounding your new content with the rest of ZC) and can be found here.

    As to EZ-pages, there is information in the FAQ at this main group.

    Effectively, need to incorporate the files associated with your new page into the page load process so that all of the associated data is present and is "inserted" into your ZC page. You keep the "structure" of what you have developed but incorporate it in such a way that it is inserted into your store.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Nov 2008
    Posts
    45
    Plugin Contributions
    0

    Default Re: Need my website Header, Footer and Sidebar on a form webpage, that I've just crea

    Quote Originally Posted by DrByte View Post
    Please explain more:
    Did you create this "form" by opening a text file on your computer and typing in all the relevant HTML to provide all the input fields etc and upload that HTML file to your server? Or did you do it in a PHP file?

    Or did you create this form with some 3rd-party service, and now you're wanting to make "their" form look like "you"?
    Thanks for your prompt replay! I used some html from Formalise as a basis to create my form on notepad++ and it's in a .php file. I also created another .php file which is run from the html coding, which takes the data entered on the form and validates that the email entered belongs to a customer and that the design they are using in the competition has been purchased by them. It then inserts the data into a table I've created in the database and also uploads their image. If all is well, it then comes back with some messages to the user that the upload was successful. I currently have it in /public_html/competition at the moment and the upload is placed into /public_html/competition/uploads (the full path to the form is https://www.thedesignertwins.com/com...pload-form.php) The form and the database insert and the validation is working, so all I need to do now is to get my website header, sidebar and footer showing on the webpage!

  5. #5
    Join Date
    Nov 2008
    Posts
    45
    Plugin Contributions
    0

    Default Re: Need my website Header, Footer and Sidebar on a form webpage, that I've just crea

    Quote Originally Posted by mc12345678 View Post
    So basically, you have created either a new page, or you have created an ez-page. By that I mean, you should follow the instruction for adding a new page to your site or how to use EZ-pages (suggesting the first more than the second because you are wanting to retrieve/use the data). Alternatively you could have possibly used a product with attributes to collect your data, though that requires going through the checkout process in order to obtain/keep the data instead of obtaining the data like when submitting a contact us form.

    So, the wiki has a good article on what is needed to create a new page (basically surrounding your new content with the rest of ZC) and can be found here.

    As to EZ-pages, there is information in the FAQ at this main group.

    Effectively, need to incorporate the files associated with your new page into the page load process so that all of the associated data is present and is "inserted" into your ZC page. You keep the "structure" of what you have developed but incorporate it in such a way that it is inserted into your store.
    Thanks for your prompt reply! Thanks for pointing me to the documentation, I'll take a look at that!

  6. #6
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Need my website Header, Footer and Sidebar on a form webpage, that I've just crea

    Quote Originally Posted by suedouglas View Post
    Thanks for your prompt replay! I used some html from Formalise as a basis to create my form on notepad++ and it's in a .php file. I also created another .php file which is run from the html coding, which takes the data entered on the form and validates that the email entered belongs to a customer and that the design they are using in the competition has been purchased by them. It then inserts the data into a table I've created in the database and also uploads their image. If all is well, it then comes back with some messages to the user that the upload was successful. I currently have it in /public_html/competition at the moment and the upload is placed into /public_html/competition/uploads (the full path to the form is https://www.thedesignertwins.com/com...pload-form.php) The form and the database insert and the validation is working, so all I need to do now is to get my website header, sidebar and footer showing on the webpage!
    Quote Originally Posted by suedouglas View Post
    Thanks for the prompt reply! I'll take a look at that documentation. Thanks for pointing me in the right direction!
    Yikes.. Honestly, considering the information that is being collected (specific concern is to the uploaded file), the fact that a customer had to have made a purchase (how does the system respond if one tries to access the form where they have not previously made a purchase and they provide an email address that has not made the purchase? Potential security related issue there if the response is any different than if all conditions were met). I would say that you should go with a product populated with attributes as many of those things can be easily addressed up front, including that the customer must be logged in to see the form (which allows a quick verification that the individual has made the purchase). Sure, you may in the end want to off load the collected data to your extra table to make things easier in the long run, but seems far less prone to some of the other concerns.

    As to the design validation part, by them being logged in already, you can present them with the designs that they have purchased so that it isn't a validation (after the upload process and submission) but instead makes things that much easier on them. And then also, what would be needed to be uploaded if "you" already have the image because it was purchased from the site? (Cut's out a little bit of excess fileage. :) )

    You can also then still use CSS to control the positioning/look of your "text boxes" and other characteristic options...

    And come to think of it, you can cut the process at the pass that if products_id=X, then perform the following with the data and don't actually add it to the cart, etc...

    Oh yeah, forgot to mention to take a look in includes/templates/default_template/css at a readme file that is there on css file naming so that you can maybe add to existing css rather than modify it.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Nov 2008
    Posts
    45
    Plugin Contributions
    0

    Default Re: Need my website Header, Footer and Sidebar on a form webpage, that I've just crea

    Quote Originally Posted by mc12345678 View Post
    Yikes.. Honestly, considering the information that is being collected (specific concern is to the uploaded file), the fact that a customer had to have made a purchase (how does the system respond if one tries to access the form where they have not previously made a purchase and they provide an email address that has not made the purchase? Potential security related issue there if the response is any different than if all conditions were met). I would say that you should go with a product populated with attributes as many of those things can be easily addressed up front, including that the customer must be logged in to see the form (which allows a quick verification that the individual has made the purchase). Sure, you may in the end want to off load the collected data to your extra table to make things easier in the long run, but seems far less prone to some of the other concerns.

    As to the design validation part, by them being logged in already, you can present them with the designs that they have purchased so that it isn't a validation (after the upload process and submission) but instead makes things that much easier on them. And then also, what would be needed to be uploaded if "you" already have the image because it was purchased from the site? (Cut's out a little bit of excess fileage. :) )

    You can also then still use CSS to control the positioning/look of your "text boxes" and other characteristic options...

    And come to think of it, you can cut the process at the pass that if products_id=X, then perform the following with the data and don't actually add it to the cart, etc...

    Oh yeah, forgot to mention to take a look in includes/templates/default_template/css at a readme file that is there on css file naming so that you can maybe add to existing css rather than modify it.
    Thanks for your reply. The list of designs is set for each competition, the designer chooses which design to be put forward, the customer does not have a choice from their own purchases, unless of course they happen to have already purchased a design that is in the list.
    If the person filling in the form isn't a customer then nothing is uploaded or inserted into the table. Likewise if the person is a customer but hasn't purchased the product they are entering into the competition, then nothing is uploaded or inserted into the table and either way they are asked to become a customer (if they aren't already) and purchase the design. Our designers sell some of the same products on other sites, so I wanted to make sure that the design being entered has been purchased from our website, as this competition which will be giving a voucher to the winners to spend on our website, is a way to generate more sales. You mentioned about having them log in beforehand but I thought if I have to do the validation on the purchase of the product, I may as well do the check if they are a customer as well. Thanks for the info on the .css file. I've looked at the document on wiki that you pointed me to, and I think it's exactly what I needed. I really appreciate your help!

 

 

Similar Threads

  1. Need some Header and Footer help please...
    By carwash in forum Templates, Stylesheets, Page Layout
    Replies: 24
    Last Post: 18 Oct 2011, 11:23 AM
  2. Trying to remove header for just one sidebar box
    By strugglingnovice in forum General Questions
    Replies: 2
    Last Post: 20 Sep 2011, 06:53 PM
  3. Hey need help with header and footer.
    By SimoasTreats in forum General Questions
    Replies: 2
    Last Post: 20 May 2010, 11:53 PM
  4. Easy way to edit header/top menu, footer menu, and sidebar menu?
    By templar2 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 30 Jun 2009, 11:14 AM
  5. How to add more than just header, footer, and sidebox ez pages areas?
    By johnlutz in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Oct 2008, 10:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR