New Zenner
- Join Date:
- Mar 2010
- Posts:
- 5
- Plugin Contributions:
- 0
Edit Orders v4.0 Support Thread
Thanks got it I hope.
Views: 345,921
New Zenner
Thanks got it I hope.
Totally Zenned
lhungil
I ran the query you pm'd me.
configuration_id configuration_title configuration_key configuration_value configuration_description configuration_group_id sort_order last_modified date_added use_function set_function
1737 IH version IH_VERSION 4.3.1 IH Version is stored but not shown on configuration menus 0 10000 2013-08-26 12:46:37 2013-08-26 12:46:37 NULL NULL
1847 Third Party Inventory Plugin GOOGLE_PRODUCTS_SWITCH_STOCK_PLUGIN none Does your system use a third party plugin for managing variant/attribute inventory? Select the plugin used or leave as 'none' for default action: 0 560 NULL 2013-08-26 13:21:05 NULL zen_cfg_select_drop_down(array(array('id' => 'none', 'text' => 'none'), array('id' => 'stockbyattributes', 'text' => 'Stock By Attributes'), array('id' => 'numinixproductvariants', 'text' => 'Numinix Product Variants')),
Totally Zenned
search for PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED
/includes/functions/functions_lookups.php
Line #231 : if (PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' and $not_readonly == 'true') {
renamedadminfolder/includes/classes/attributes.php
Line #206 : if(PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' && $readonly === false) {
Line #256 : if(PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' && $readonly === false) {
renamedadminfolder//includes/functions/general.php
For: PRODUCTS_OPTIONS_TYPE_READONLY
includes/functions/functions_lookups.php
Line #231 : if (PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' and $not_readonly == 'true') {
Line #235 : where pa.products_id = '" . (int)$products_id . "' and po.products_options_type != '" . PRODUCTS_OPTIONS_TYPE_READONLY . "' limit 1";
/includes/modules/attributes.php
Line #180 : if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_FILE or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_TEXT or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_CHECKBOX or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_RADIO or $products_options->RecordCount() == 1 or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY) {
Line #486 : if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY) {
Line #552 : case ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY):
renamedadmin/edit_orders.php
Line #992 : case PRODUCTS_OPTIONS_TYPE_READONLY:
Line #1532 : case PRODUCTS_OPTIONS_TYPE_READONLY:
renamedadmin/includes/attributes_preview.php
Line #173 : if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_FILE or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_TEXT or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_CHECKBOX or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_RADIO or $products_options->RecordCount() == 1 or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY) {
Line #484 : if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY) {
Line #550 : case ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY):
renamedadmin/includes/classes/attributes.php
Line #27 : function get_attribute_options_values_by_type($zf_product_id, $options_type = PRODUCTS_OPTIONS_TYPE_READONLY) {
Line #98 : function get_attribute_options_names_by_type($zf_product_id, $options_type = PRODUCTS_OPTIONS_TYPE_READONLY) {
Line #155 : function get_attributes_options_by_type($zf_product_id, $options_type = PRODUCTS_OPTIONS_TYPE_READONLY) {
Line #206 : if(PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' && $readonly === false) {
Line #207 : $query .= 'AND opt.products_options_type != '' . PRODUCTS_OPTIONS_TYPE_READONLY . '' ';
Line #256 : if(PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' && $readonly === false) {
Line #257 : $query .= 'AND opt.products_options_type != '' . PRODUCTS_OPTIONS_TYPE_READONLY . '' ';
renamedadmin/includes/functions/general.php
Line #2024 : if (PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' and $not_readonly == 'true') {
Line #2028 : where pa.products_id = '" . (int)$products_id . "' and po.products_options_type != '" . PRODUCTS_OPTIONS_TYPE_READONLY . "' limit 1";
New Zenner
Have just installed this Plugin having used it on an earlier version.
Currently on v1.5.1 with the 'Big Royal Mail' shipping modules installed.
When I go to edit an order the shipping options are shown as below:
I have checked and feel sure I have uploaded everything correctly. Is this a conflict of the two plugins an can it be fixed?
Thanks in advance.
Totally Zenned
Bruce_m:
Have just installed this Plugin having used it on an earlier version.
Currently on v1.5.1 with the 'Big Royal Mail' shipping modules installed.When I go to edit an order the shipping options are shown as below:
I have checked and feel sure I have uploaded everything correctly. Is this a conflict of the two plugins an can it be fixed?
Thanks in advance.
Can't see the teeny tiny image you posted.. So don't know what the issue is at the moment..
Totally Zenned
I went back to my test install with a different db and set of products but the same mods installed. I just added new options and option values to a product and the behavior is the same as previously reported when editing orders, no selectable options on step 3 when adding products to orders. It must be something in the combination of mods that screws things up (mistake in merging maybe).
Totally Zenned
mydanilo:
...
I ran the query (select * from configuration where configuration_group_id='0').
...
It looks like some required attribute entries are missing from your Zen Cart database. You should take a look at the link lat9 posted earlier: "Attribute Required for Text flag not working" (and add the missing entries back into the database).
mydanilo:
search for PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED
...
You should see something like the following letting you know what the configured value for those entries are in your database. If you do not find these (you can see they are used in many places by Zen Cart and this module)... Something has happened to your Zen Cart installation to remove core database entries (required for attributes to function)... If you do find them, what are they set to?
[Attachment no longer available]
Note: If these are missing, there may be other things broken / missing in your database (or installation)...
Totally Zenned
lhungil:
It looks like some required attribute entries are missing from your Zen Cart database. You should take a look at the link lat9 posted earlier: "Attribute Required for Text flag not working" (and add the missing entries back into the database).
You should see something like the following letting you know what the configured value for those entries are in your database. If you do not find these (you can see they are used in many places by Zen Cart and this module)... Something has happened to your Zen Cart installation to remove core database entries (required for attributes to function)... If you do find them, what are they set to?
[Attachment no longer available]
Note: If these are missing, there may be other things broken / missing in your database (or installation)...
and this goes back to what both lat9 and I have both posted suggested.. the MOST likely cause is an errant SQL install file from one of his other modules which has removed the configuration table entries.. The post that lat9 posted clearly outlines the kind of errant SQL that would cause this.
New Zenner
Totally Zenned
Bruce_m:
Hope this is a little clearer.
NO ONE can SEE these images.. the detail is too small.. Why don't you simply STATE what the issue is.. it will be SOOOOOOO much easier...
from what you've posted thus far, the issue is with the Big Royal Mail' shipping module. You are either SEEING or NOT SEEING something when you click the shpping dropdown.. What is it you are SEEING or NOT SEEING, and what is it you expect to see or not see instead??
New Zenner

Hopefully this will help
Totally Zenned
PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED
Result looks exactly like in your picture
and I want to add that on the front end all options are working correctly for all products
and I am totally lost by the info in the link you provided, sorry! SQL stuff is not my strength. Can you point out what I should run and look for? I have cpanel access.
Totally Zenned
Bruce_m:
Hopefully this will help
bigger pictures and still NO IDEA WHAT THE ISSUE IS..Pardon my bluntness here, but believe it or not the images don't tell us jack anyway.. So instead of posting MORE pictures.. PLEASE PLEASE PLEASE...
Why don't you simply STATE (in WORDS) what the issue is.. it will be SOOOOOOO much easier...
from what you've posted thus far, the issue is with the Big Royal Mail' shipping module. You are either SEEING or NOT SEEING something when you click the shipping dropdown.. What is it you are SEEING or NOT SEEING, and what is it you expect to see or not see instead?? It looks like there is something in the Royal Mail dropdowns that shouldn't be there???
Help the community to help you by providing some DETAILS as to the issue you are having so we don't have to GUESS at the problem..
New Zenner
What I am seeing is in the Shipping Drop Down I have the available shipping options all with their HTML for colour font etc:
e.g. Royal Mail Airmail <span style= “font weight; normal - and so on
I had expected and would prefer to see simply - ‘Royal Mail Airmail’ without the HTML
How can I get this please?
Totally Zenned
Bruce_m:
What I am seeing is in the Shipping Drop Down I have the available shipping options all with their HTML for colour font etc ...
Shipping Module Background
First let me give you some background on shipping modules (quick not exhaustive). Typically you only have a single shipping module per shipping carrier (UPS, USPS, FexEx, etc). When a customer requests a "quote" this single shipping module communicates with the shipping carrier and retrieves either a single quote or a list of quotes with shipping options.
This makes sense for customers as they would see: "This store offers Royal Mail shipping"!. Inside the "Royal Mail" shipping section the customer would then see different (and selectable) shipping methods for "Royal Mail". This avoids confusion if more than one shipping carrier is available (such as flat rate, table rate, free shipping, UPS, etc).
To make this work, each shipping module defines a unique "name" for the module. This is saved in the shipping module to "$this->title". This "name" is then used as the display text for the shipping module section (not for the shipping options such as "airmail", "2nd day", "priority", etc). The actual shipping options are returned separately and only when a quote has been requested by the customer and are typically returned as an array. As such the "name" returned by the module does not usually include HTML code.
Royal Mail add-on
First let me say I do not use the "Royal Mail" add-on and have not looked at the source code. It probably returns valid and working quotes and as such is functional. However the add-on does not appear to follow the usual Zen Cart shipping module convention. Instead of a single shipping module returning multiple shipping options for one carrier, this module appears to add a separate shipping module for each shipping method... Which means a customer see's a shipping carrier box for each method! No disrespect intended to the author of the "Royal Mail" add-on, but it would be cleaner if the convention was followed.
The second critique I have is "presentational" HTML data has been added to what really should just be data. Not sure if this is part of the "Royal Mail" add-on or something someone added by editing part of the add-on (such as a language file or the core module itself). One should always avoid combining the two when possible (encapsulating the data is acceptable, but no "style" attributes should be used). Using a "style" attribute overrides any CSS (which is where your presentational logic SHOULD be whenever possible). Otherwise guess what happens if one changes the website look and feel (using CSS)? Text may disappear, images may not load, sizes may be off, and layouts may become broken (until one manually edits the module producing data).
How the shipping module dropdown shown in "Edit Orders" works
Edit Orders at this time does NOT allow admin users to get a "quote" or a "list of quotes" for a shipping module. Further changing the selected shipping module does NOT recalculate the shipping total (only shipping tax which is handled by ot_shipping).
Bruce_m:
... I had expected and would prefer to see simply - ‘Royal Mail Airmail’ without the HTML ... How can I get this please?
I would as well, even as a customer!
The first thing I would change (if in your shoes), would be to remove the "style" attributes from the names of your shipping modules.
The second change (needed only if you really MUST use HTML containers in the name of the shipping module) would be to use strip_tags to remove the HTML. The problem with using strip_tags is if the HTML is malformed it may remove more than expected (or even everything). If you are okay with that caveat, go ahead and open up "/admin/includes/functions/extra_funcions/edit_orders_functions.php". Search for the function "eo_get_available_shipping_modules()". Inside this function find the line where the "title" is assigned to the "text". Change the code to read:
$retval[] = array(
'id' => $GLOBALS[$class]->code,
'text' => strip_tags($GLOBALS[$class]->title)
);
New Zenner
Thank you for your very full and helpful reply - probably best not to risk messing up what the customer see on the front end for the few occasions when an order needs to be changed. Again thanks!
Totally Zenned
Bruce_m:
Thank you for your very full and helpful reply.
No problem. Thank You for pointing out what you were seeing (and expected to see)!
Hopefully did not overwhelm anyone with the long post... I've spent a fair amount of time working with shipping modules (still learning a few things) in the course of another project... So just wanted to give some insight into why the "Edit Orders" code in regards to the shipping modules is the way it is today.
Making the change to "/admin/includes/functions/extra_funcions/edit_orders_functions.php" will only affect what is shown in the admin dropdown (not for the customers), so should be fairly safe (and in the image the HTML used by your shipping modules appears correctly formed).
I'm hesitant to enable this globally in future versions by default (I can see the "my shipping module is blank / does not show up" questions already)... But I might add an "option" in the configuration of "Edit Orders" in the future (to selectively enable / disable stripping HTML from the name for the shipping dropdown). Seems like an okay idea at the moment. Anyone else have thoughts on this?
Totally Zenned
lhungil:
I might add an "option" in the configuration of "Edit Orders" in the future (to selectively enable / disable stripping HTML from the name for the shipping dropdown). Seems like an okay idea at the moment. Anyone else have thoughts on this?
I like this idea..:yes: It's safe, and it might even fix Bruce's issue.. Perhaps Bruce could beta test it???
New Zenner
"Edit orders" not re-calculating tax for after I change product quantity for customers. TAX calculation works fine if customer checkout from front end.
What can be done?
Totally Zenned
gsmsalers:
"Edit orders" not re-calculating tax for after I change product quantity for customers. TAX calculation works fine if customer checkout from front end.
What can be done?
Start by providing more information. Zen Cart version (exact)? Edit Orders version (exact)? Store upgraded from previous version? Other installed modifications (especially any which may impact taxes)? Additional Order Total modules (not part of stock Zen Cart)? Steps to replicate (and what was expected)? What if any debugging has been attempted? Any error logs? Any other information about how your store differs from a stock Zen Cart 1.5 installation?
Fields marked required must be completed.
Tell staff why this post should be reviewed.