i installed this file https://www.zen-cart.com/attachment....8&d=1243290689 how can i query the flag i set in tpl_product_info_display
i installed this file https://www.zen-cart.com/attachment....8&d=1243290689 how can i query the flag i set in tpl_product_info_display
i need to find this if($_SESSION['cart']->flag_exclude_free_shipping){ when not in cart($_session) to change a flag to false on a majority of items
A visual inspection of the referenced code looking at a modification of the admin/includes/modules/product/collect_info.php file, there appears to be a database field added to the products table called: products_carrot.
Based on that, an assumption (without fully installing the plugin) is that you are wanting to have access to the data stored there and then to take action similar to what is performed while looking at the product page.
Data made available on the product page is typically collected through files in includes/modules/pages/product_info.
To pull the products_carrot field, it would need to be a part of the query of the associated product or through a separate query specifically to return that field's value from the products table.
Typically this is done either in one of the main_template_vars_* files or as a result of their execution (observer). Even though you are using ZC 1.5.1 (as reported when posting), it is still possible to use the observer class to get and set the necessary data.
After retrieving the field, it seems like you would want to "process" it to get the same result as obtained through the shipping class. It may not be by modifying the cart session, but the same effect can be obtained.
Whatever is done, just remember that you may want to consider the ability to apply the modification to other product types and also how you will apply it through the upgrade path. (good documentation helps with that.)
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
i have over 6500 products to set this flag on, it is not in Products Db
Last edited by jimmie; 29 Oct 2018 at 05:34 PM.
Just trying to get this to workCode:<!--bof free ship icon --> <?php if ($product_is_always_free_shipping >= 3) { ?> <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div> <?php } ?> <!--eof free ship icon -->
figured it out had to do it like thisCode:<?php if($product->fields['product_is_always_free_shipping'] == 0) { ?>
Bookmarks