Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jul 2009
    Posts
    122
    Plugin Contributions
    0

    Default Overrides directory question about free shipping text.

    Hello I seem to be facing an issue with the over rides directory and changing the text "Free shipping for orders over %s" which is shown on the shopping carts first page.

    I understand how the over rides directory works and I have used it a number of times in the past without any problems. But for some reason it doesn't seem to work with the text changes I have made to the files that control what is said on this page.

    For example I used the Developers Tool Kit to find "Free shipping for orders over" and the search told me that this text is in the following three files:

    Code:
    /home/mysite/public_html/includes/languages/english/checkout_shipping.php
    
    Line #30 : // when free shipping for orders over $XX.00 is active
    
    Line #32 : define('FREE_SHIPPING_DESCRIPTION', 'Free shipping for orders over %s');
    Code:
    /home/mysite/public_html/includes/languages/english/modules/order_total/ot_shipping.php
    
    Line #26 : define('FREE_SHIPPING_DESCRIPTION', 'Free shipping for orders over %s');
    Code:
    /home/mysite/public_html/includes/modules/order_total/ot_shipping.php
    
    Line #111 : $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Free Shipping For Orders Over', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', '50', 'Provide free shipping for orders over the set amount.', '6', '4', 'currencies->format', now())");
    So I changed the first two files on their respective lines to reflect the text that I want the shopping cart to display and in this case I want it to display "Your order qualifies for free shipping as the total is over %s"

    I then saved these files as new files with the same name of course and created over ride directories as follows:

    Code:
    /home/mysite/public_html/includes/languages/english/MY_TEMPLATE/checkout_shipping.php
    Code:
    /home/mysite/public_html/includes/languages/english/modules/order_total/MY_TEMPLATE/ot_shipping.php
    But for some reason the text is not changed .

    However if I replace the ot_shipping.php file located here and without using the over rides directory:

    Code:
    /home/mysite/public_html/includes/languages/english/modules/order_total/ot_shipping.php
    with the edited one I just created the text is changed to what I want it to display. But of course this is not the ideal solution due to upgrade purposes in the future etc and I would prefer it to work with the over rides directory if possible.

    So I guess my question is. Is the over rides directory suppose to work in this case? As the order_total directory contains a classic directory inside of it. So I assumed that by adding the name of my template directory" inside of the order_total directory and then placing the new file inside it I could then use the over rides system as per normal. But it doesn't seem to work.



    So any thoughts or suggestions as to what might be causing this issue would be greatly appreciated.

    Thanks.

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: Overrides directory query in regards to free shipping text.

    It's WHERE you put the override folders that matters>


    /public_html/includes/languages/english/modules/order_total/filename.php
    /public_html/includes/languages/english/modules/order_total/CUSTOM_TEMPLATE/filename.php

    /public_html/includes/languages/english/modules/payment/filename.php
    /public_html/includes/languages/english/modules/payment/CUSTOM_TEMPLATE/filename.php

    /public_html/includes/languages/english/modules/shipping/filename.php
    /public_html/includes/languages/english/modules/shipping/CUSTOM_TEMPLATE/filename.php

    There is a "built-in" guide in zencart...

    Wherever you see a classic folder, that's where you should also have an override folder for YOUR template (ie: at the same level).
    19 years a Zencart User

  3. #3
    Join Date
    Jul 2009
    Posts
    122
    Plugin Contributions
    0

    Default Re: Overrides directory query in regards to free shipping text.

    Quote Originally Posted by schoolboy View Post
    It's WHERE you put the override folders that matters>


    /public_html/includes/languages/english/modules/order_total/filename.php
    /public_html/includes/languages/english/modules/order_total/CUSTOM_TEMPLATE/filename.php


    There is a "built-in" guide in zencart...

    Wherever you see a classic folder, that's where you should also have an override folder for YOUR template (ie: at the same level).
    Hi and thanks for your reply.

    After doing some additional testing the over rides directory is actually working for the following.

    Code:
    /home/mysite/public_html/includes/languages/english/MY_TEMPLATE/checkout_shipping.php
    This text is actually shown on the second page during checkout and I originally thought it was suppose to show on the first page.

    However the first checkout page is still displaying the default text and I realise it's where I put the over ride folder that counts and I did notice the classic folder in the order_totals directory so I assumed that this is where I was suppose to add my custom template directory as well and that's what I did. So in other words inside the order_total directory I now have the following directories:

    classic
    MY_TEMPLATE

    Then inside my template directory I placed the ot_shipping.php file that I changed to reflect the text that I want shown on the shopping carts first page.

    But of course this over rides directory isn't working for some reason as the text change isn't being shown on the shopping cart page.

    However if I replace the original ot_shipping.php that resides in the order_total directory with my new file then the text is changed.

    So I don't understand why the over rides system isn't working in this case as the name of my template directory which is placed inside the order_total directory is correct so any file(s) placed inside this directory should over ride the other file(s) inside the order_total directory but they are not for some reason.



    The only thing I can think of as to why it's not working for is that perhaps there is a limitation on depth and names of the directories? Is this possible? I am also on a Linux server.

    Thanks.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: Overrides directory query in regards to free shipping text.

    However if I replace the original ot_shipping.php that resides in the order_total directory with my new file then the text is changed.
    That's because you edited the CORE file, and have not put the OVERRIDE file in the correct location.

    The rule is simple... wherever you see a CLASSIC folder, create a NEW folder named as MY_TEMPLATE.

    The override files for that particular function will go into that override folder. There is no "limitation" issue... Just get the LOCATION correct, and it will work.

    YOU don't decide where the override file goes... ZENCART does... so... if you see a CLASSIC folder somewhere in the templates or languages or modules areas, then create a new folder AT THE SAME LEVEL, named as MY-TEMPLATE....
    19 years a Zencart User

  5. #5
    Join Date
    Jul 2009
    Posts
    122
    Plugin Contributions
    0

    Default Re: Overrides directory query in regards to free shipping text.

    Quote Originally Posted by schoolboy View Post
    That's because you edited the CORE file, and have not put the OVERRIDE file in the correct location.

    The rule is simple... wherever you see a CLASSIC folder, create a NEW folder named as MY_TEMPLATE.

    The override files for that particular function will go into that override folder. There is no "limitation" issue... Just get the LOCATION correct, and it will work.

    YOU don't decide where the override file goes... ZENCART does... so... if you see a CLASSIC folder somewhere in the templates or languages or modules areas, then create a new folder AT THE SAME LEVEL, named as MY-TEMPLATE....

    Hi and thanks for taking the time to reply again. I do appreciate your help. But maybe I am not explaining myself properly ?

    I previously created a new folder by the name of my template and at the same level as the Classic folder and within this folder I placed the modified "ot_shipping.php: file this is why I don't understand why the over rides system is not working?



    Please see the following images so you clearly see that I have my custom template folder and in this case is called ZCTEMPLATE at the right and same level as the classic folder as per your post. Then in the second image you can see that I have the "ot_shipping.php" file residing inside of it. Which should mean that the over rides system should work. But for some reason it isn't.





    I have used the over rides system a number of times in the past with mods I have downloaded from the Free Addon's section without any issues until now. So this is why I don't understand why it's not working for me now.

    So any additional thoughts or suggestions as to why it's not working for will be greatly appreciated and thanks once again for taking the time to help me.

  6. #6
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Overrides directory question about free shipping text.

    At the risk of asking an obvious question. ZCTEMPLATE IS the name of the template you have active right?

  7. #7
    Join Date
    Jul 2009
    Posts
    122
    Plugin Contributions
    0

    Default Re: Overrides directory question about free shipping text.

    Quote Originally Posted by badarac View Post
    At the risk of asking an obvious question. ZCTEMPLATE IS the name of the template you have active right?
    Hi and thanks for your reply. But oh yes I have checked this numerous times just to be sure. I even copied and pasted the name straight from another folder just to be sure that I have the spelling right even though the spelling is obvious .

    It's a real strange one to be honest and I'm just about to give up on it and just over write the core file as it really doesn't make any sense as the over rides system should be working just like it does on all the other mods.


  8. #8
    Join Date
    Mar 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: Overrides directory question about free shipping text.

    I have been trying to do the same as CybaGirl and I am getting the same results.

    Editing the core file changes the text.

    Creating an override folder with the file in it does not change the text.

    Strangely it seems to be limited to overrides for the order_total files. Creating overrides for the other modules folders works out fine. Possibly a bug perhaps?

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Overrides directory question about free shipping text.

    Which file are you trying to override?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Jul 2009
    Posts
    122
    Plugin Contributions
    0

    Default Re: Overrides directory question about free shipping text.

    Quote Originally Posted by soyofthenorth View Post
    I have been trying to do the same as CybaGirl and I am getting the same results.

    Editing the core file changes the text.

    Creating an override folder with the file in it does not change the text.

    Strangely it seems to be limited to overrides for the order_total files. Creating overrides for the other modules folders works out fine. Possibly a bug perhaps?
    Glad to see I am not the only one who had this issue! There is a definite problem here and I think there is a limitation on the directory depth and this is why it's not working. Because either the OS or ZenCart isn't capable of reading past a certain amount of characters more or less like Windows does.

    Quote Originally Posted by Ajeh View Post
    Which file are you trying to override?
    The file is called ot_shipping.php if you modify this core file and put it inside an over rides directory ZenCart still reads the original core file and not the one located in the over rides directory.

    I ended up just modifying the core file as the over ride folder in this instance does not work for some reason.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Shipping Module Programming Question about weight and free shipping
    By voltar in forum Built-in Shipping and Payment Modules
    Replies: 59
    Last Post: 18 Nov 2011, 10:29 PM
  2. General question about overrides
    By jeffmic in forum General Questions
    Replies: 2
    Last Post: 23 Sep 2010, 05:08 AM
  3. quick question about overrides vs Image Handler2 addon
    By buckit in forum Basic Configuration
    Replies: 2
    Last Post: 25 Aug 2010, 09:11 PM
  4. Free shipping item overrides other fees.
    By GonzoInRoch in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 31 Mar 2008, 07:39 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