Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2011
    Location
    Northumberland
    Posts
    48
    Plugin Contributions
    0

    Default Some coding help please

    i could do with some help here please as i am not a coder at all.

    In my site sighthoundsforlife.org i have a sponsorship category and in this category i put dogs who need sponsorship in there as a new document.
    On the main page it states 'New products for June' and this is really poor as it indicates they are products, so i would like just for this category to read something like 'New arrivals for June'.
    Can anyone help please

    malc

  2. #2
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    376
    Plugin Contributions
    0

    Default Re: Some coding help please

    Open your english.php file. Go to line 552
    change,
    define('TABLE_HEADING_NEW_PRODUCTS', 'New Products for %s');
    to,
    define('TABLE_HEADING_NEW_PRODUCTS', 'New arrivals for %s');

    Your english.php file is located under domain/includes/languages/

    You will need an ftp client such as FileZilla (it's free). If you run into trouble just tell me!

  3. #3
    Join Date
    May 2011
    Location
    Northumberland
    Posts
    48
    Plugin Contributions
    0

    Default Re: Some coding help please

    Thank you for your prompt reply, will this not change the other categories as well

    malc

  4. #4
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    376
    Plugin Contributions
    0

    Default Re: Some coding help please

    It will.. seems I didn't read your question careful enough.. you could approach this in a different way using a page specific stylesheet for the category you wish to change/modify. It's way more fun this way.

    Try this article:
    http://www.zen-cart.com/wiki/index.p...Per-Page-Rules

    If you need more help, just tell me.

  5. #5
    Join Date
    May 2011
    Location
    Northumberland
    Posts
    48
    Plugin Contributions
    0

    Default Re: Some coding help please

    thank you, i will give it a good read and go for it
    cheers

  6. #6
    Join Date
    May 2011
    Location
    Northumberland
    Posts
    48
    Plugin Contributions
    0

    Default Re: Some coding help please

    right then....if i was doing standard html i think i get it, i could create a animal.css and attach it to the page if it was called animal, but this is php and i have not got a clue with this style of pages within pages.
    I have been trying to understand how it works so i can go to the correct file when wanting to edit it but i have learnt it is like chalk and cheese and apart form the html includes i am out of the loop i'm afraid...
    any pointers welcome

  7. #7
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Some coding help please

    Um ... you can't change the text/wording on a page using just a css stylesheet.

    Does this wording-change need to be only for a certain category number? If so, which cPath does it apply to? ie: the URL of the page contains a &cPath= reference. And does it have any subcategories which also need it?


    Is there anything else particularly unique about these "arrivals" that makes them specifically different from "products"? Maybe you need to write a custom product-type to handle different layout and different wording etc ... making numerous more drastic changes for a broad collection of "products". This is definitely a more "advanced" topic though.
    .

    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.

  8. #8
    Join Date
    May 2011
    Location
    Northumberland
    Posts
    48
    Plugin Contributions
    0

    Default Re: Some coding help please

    That statement says something to me now, thanks. So if it states path = 18 i assume this is the category of 'sponsorship'. When in the product it shows number 78 one of the dogs, but i think there is too many references in there for me to mess with changing the word product to something else, so i am quite happy just to show the word change in the category.
    thank you

  9. #9
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Some coding help please

    Okay, keeping it VERY basic, Soniccc's idea will work, with some alterations:

    create a new file at: /includes/languages/twist_of_nature/english.php
    If you don't already have that folder and that file at that location, make one containing just the following code. If you *do* already have that , then simply add the following code (except the <?php line) to the end of it:
    Code:
    <?php 
    // custom label for category 18 and its subcats
    if (isset($_GET['cPath']) && (int)$_GET['cPath'] == 18) {
      define('TABLE_HEADING_NEW_PRODUCTS', 'New arrivals for %s');
    }
    You could add other defines normally found in the main english.php inside this "if" statement if you need to change things specifically for that category.
    .

    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.

  10. #10
    Join Date
    May 2011
    Location
    Northumberland
    Posts
    48
    Plugin Contributions
    0

    Default Re: Some coding help please

    That is perfect thank you so much
    I already had a copy of the english.php in this folder for some other bits i have tinkered with and i reading your post i have a question about the changes.
    Above i would have created the new file and just entered this code for the overide template, does this mean you do not need to copy the whole page but just the lines you want to change for these pages?

    Thanks again
    malc

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. php coding help please..
    By philip937 in forum General Questions
    Replies: 2
    Last Post: 20 Nov 2009, 11:25 PM
  2. Coding help please
    By Nixak in forum General Questions
    Replies: 0
    Last Post: 24 Jul 2009, 03:21 PM
  3. A little help with some coding required!
    By Still Crazy in forum General Questions
    Replies: 2
    Last Post: 12 Apr 2007, 06:13 AM

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