Page 27 of 28 FirstFirst ... 1725262728 LastLast
Results 261 to 270 of 272
  1. #261
    Join Date
    Aug 2013
    Location
    Bridlington
    Posts
    151
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    Okay its 2.17am and it`s time for bed.

    Spent the last 30 mins or so looking at logs and rectifying the errors where I had put a , after all the ink_ml

    Also the last file to edit was not the one in the default template but the RSB folder.

    We now have 99% success, here is the data exactly where I want it ..

    Click image for larger version. 

Name:	Capture.jpg 
Views:	33 
Size:	24.4 KB 
ID:	17255

    Problem is in step 3 rather than using Guarantee (In Months) I put Ink Or Toner Capacity but nothing is showing only a 6 that is coming from the database ??

  2. #262
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

    Default Re: How-To: Add new Properties to your Products

    Generally speaking for "home use" (meaning unless there is a specifically considered reason), it is wise never to modify the template_default files. They are a stock, backup set of files that if they do not exist in a template override then they will be used. Take the statement with a heavy grain of salt, but there are a number of benefits of not editing the file(s) that are in there, doesn't mean can't add to those files or anything else, just a benefit to leave them be. How else will you be able to compare operation of the current template to a fully functional one?

    As to the display, steps 3 and say 7 or 8 are completely distinct and unrelated. The original instructions were primarily about how to get the data to and from the database. There is additional language work to be done in the tpl_product_info_default.php file and associated includes/languages directory to make your addition more language friendly if you happen to go multi-language.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #263
    Join Date
    Aug 2013
    Location
    Bridlington
    Posts
    151
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    Im not that bothered about multi language MC and all the steps followed have given me the result I required however that 6 on the pic above just sits there with no info what it is LOL, ideally I would want something like this ...

    Click image for larger version. 

Name:	Capture copy.jpg 
Views:	34 
Size:	28.1 KB 
ID:	17256

    Other than that everything is working a treat. I was thinking there maybe a variation to step 8 to include the text before 6 fetched from the database.
    Last edited by MCS_Computers; 29 Aug 2017 at 01:43 PM.

  4. #264
    Join Date
    Aug 2013
    Location
    Bridlington
    Posts
    151
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    Found a post on page 9 that covers my question, I must have missed that. Edit done and now working perfect. MC yet again your a star. I put 6ml in the product edit but it will not hold the ml part but I`m assuming that's down to the database field I`ll look into that but other than that perfect. Store is now ready to launch :) thanks again MC on this and all the other threads you`ve solved for me ;)

  5. #265
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

    Default Re: How-To: Add new Properties to your Products

    Quote Originally Posted by MCS_Computers View Post
    Found a post on page 9 that covers my question, I must have missed that. Edit done and now working perfect. MC yet again your a star. I put 6ml in the product edit but it will not hold the ml part but I`m assuming that's down to the database field I`ll look into that but other than that perfect. Store is now ready to launch :) thanks again MC on this and all the other threads you`ve solved for me ;)
    Your field (ink_ml) is likely some numeric value like a float or an int, therefore the text ml will not get stored. Now, thing is, if you were able to add text before the value, you should be able to add text after it as well. Besides, why would you want to put something in a database field that is the same for every entry? What happens if one time you forget to add the ml? Then another, etc... if you're worried about displaying say 1,000 ml, then ok, might need something to help with that, but...

    Welcome, glad you were able to find something of assistance. Trying to guide you to improvement as well as get your issues resolved.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #266
    Join Date
    Aug 2013
    Location
    Bridlington
    Posts
    151
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    You were right, prior to your post I went into PHPMYADMIN and saw that the ink_ml field was infact set to int, I made the relevant changes and now everything works well.

    I needed this entry because ink cartridges are done in ml and toners are done in page yield so I just needed to identify what the number meant so although the number changes for each product I either want ml if its an ink cartridge or Page Yield if it is a toner.

    I already had a CSV that I imported with EP so all I did was added another column to the CSV with ml and page yield and with a little excel addon merged the 2 columns together.

    Worked a treat, you have helped me understand so much more than I did a few weeks ago and have been very patient, for that I thank you MC ;)

  7. #267
    Join Date
    Aug 2017
    Location
    Wandong
    Posts
    19
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    A big thank you to Chris for this tutorial... It's exactly what I've been trying to do in adding specific instructions for attributes and it works brilliantly!

    In my mods, I've changed from an input field to a text area, which is working really well, but I'm looking to do some highlighting features (example below)

    If I enter this - (edit- Sorry, what I've put below is NOT the code I'm using... it's an example of the data I put in. A bit confusing because I wrapped it in code tags)
    Code:
    <strong>Extra Attribute Info goes here</strong>
    it saves it and shows it as this -
    Code:
    &lt;strong&gt;Extra Attribute Info goes here&lt;/strong&gt;
    The idea is to make any instructions prominent for customers to see with <strong>, <br>, <h7> and so on...

    When entering into the "Products Description", I can use those elements where they work as expected, but not in the extra field I've put in...

    I'm at a loss now so I'm asking for clues where I've gone wrong...
    Thanks in advance
    John
    Last edited by Foster660; 8 Sep 2017 at 01:20 AM.

  8. #268
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

    Default Re: How-To: Add new Properties to your Products

    Welcome to the new world of sanitization. ZC without knowing how the input is to be used, will "strip" such codes from the input for security sake as corrected for all of ZC 1.5.x here: https://www.zen-cart.com/showthread....d-TWSL2016-006
    With direction of how to apply sanitization for your input contained in the first post which directs to here: http://docs.zen-cart.com/Developer_D...n_sanitization
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #269
    Join Date
    Aug 2017
    Location
    Wandong
    Posts
    19
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    That all makes sense now, thanks!

    All I need to do is figure out how to use it... (with sanitizing disabled, everything works as I was expecting)

    Thanks for your help, John

  10. #270
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

    Default Re: How-To: Add new Properties to your Products

    Quote Originally Posted by Foster660 View Post
    That all makes sense now, thanks!

    All I need to do is figure out how to use it... (with sanitizing disabled, everything works as I was expecting)

    Thanks for your help, John
    Looks like that docs link has been "moved", the most directly applicable (to ZC 1.5.5) is: http://docs.zen-cart.com/Developer_D...n_sanitization

    Somewhat surprisingly, it's not too difficult to apply the desired sanitization once the regex stuff at the bottom is better understood (currently doesn't have "straight" words about what it allows/removes, just identifies the "code" of what it does).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 27 of 28 FirstFirst ... 1725262728 LastLast

Similar Threads

  1. change how latest products works or add new box that displays products we select
    By Sushigal in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 12 Oct 2010, 04:19 PM
  2. shopping cart contents and new properties to the products
    By stitchnkitty in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Nov 2009, 05:50 PM
  3. Replies: 4
    Last Post: 20 Jun 2009, 04:06 PM
  4. !! Please help !! Add new Properties to your Products
    By JohnSquier in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 27 Feb 2008, 05:46 AM
  5. alter and add new product properties
    By jmitton in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 20 Jan 2008, 03:24 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