Hi to all,
I have already successfully modified the line_items fields in AOS_Products_Quotes (in this case I added discounts).
Now I would also like to update my Line_Items.php but, to proceed, I need to override the two include that are in AOS_Quotes/vardefs.php which now point to modules/AOS_Products_Quotes/Line_Items.php and instead should point to custom/modules/AOS_Products_Quotes/Line_Items.php.
So, after reading the documentation and many threads, I still can’t figure out which is the right way (and where to place the file). Because, if Vardefs is not updated correctly, it is removed at the first repair.
I have already tried but maybe in the wrong way.
In fact from the examples I can understand how to do when I have to add a feature but in this case I have to overwrite it.
So for line_items I think it should look like something but it’s not certainly correct.
something happens because if I click on the quotes list in front end a white “undefinited” popup will open. Even if the line_items.php file is the same as the original. But at the moment, I still don’t understand the problem.
Yes exactly. I would like to do this by modifying everything on the right way as I have done so far, without modifying the original files. Is this override of the include not possible? Thanks for the answers.
So, I uploaded my file inside
custom\Extension\modules\AOS_Quotes\Ext\Vardefs change_includes.php
and, in effect, removing the empty spaces and after a Quick Repair, now I find the file
vardefs.ext.php
inside custom\modules\AOS_Quotes\Ext\Vardefs with the following code
<?php
//WARNING: The contents of this file are auto-generated
$dictionary['AOS_Quotes']['fields']['line_items']['function']['include'] = 'custom/modules/AOS_Products_Quotes/Line_Items.php';
$dictionary['AOS_Quotes']['fields']['shipping_tax_amt']['function']['include'] = 'custom/modules/AOS_Products_Quotes/Line_Items.php';
?>
So something has been done.
However now the file Line_Items.php in custom is the same as the originall but if I click on an item in the list view (in quotes but also in account) I receive an undefinited popup, without being able to see an error (see attachment).
Hi and sorry if I bring this thread up again.
I’m pretty worried because I can’t get through this situation.
So, to recap:
I have successfully modified the line.items.js file in AOS_Products_Quotes custom folder
I have a modified and running line_itemes.php (because if I use it in the original folder of the AOS_Products_Quotes module there is no errors)
I managed to generate the Vardefs indicated in the previous post to overwrite includes and use my own line_items.php (at least it seems like the result is correct)
but, if I put my line_items.php in the AOS_Products_Quotes custon folder, after having generated the extension to Vardefs, I receive that undefinited white popup.
If I look at the logs, I get the following two lines that don’t help
Thu Oct 3 10:57:14 2019 [9149][1][WARN] Saving error level. Try to remove the error_reporting() function from your code.
Thu Oct 3 10:57:14 2019 [9149][1][ERROR] Pop error level. Try to remove the error_reporting() function from your code.
In console, I see the errors attached.
I can’t activate php.ini on the server so I have no idea about the problem.