No, if a flammable product is in the cart then I want to be able to turn off table1.php
I assume now your going to tell me that the code would need to be entered into table 2.php?
No, if a flammable product is in the cart then I want to be able to turn off table1.php
I assume now your going to tell me that the code would need to be entered into table 2.php?
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk
No, if you want to turn off table1.php for flammable products, and you set those master_categories_id to the flammable products master_categories_id then you want to add that code to the table1.php code just below the code similar to:
Code:// disable only when entire cart is free shipping if (zen_get_shipping_enabled($this->code)) { $this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false); }
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!]
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!
ok, I think you probably mean the other way round though don't you?
table1.php Non Flammable
table2.php Flammable
So I want to turn off table1.php when a flammable product is in the cart.
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk
Sorry just re-read what you put. That would be correct then.
Thank Linda
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk
Sure thing ... let us know how this works for you ...![]()
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!]
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!
Hi Linda this works perfectly, I just need to apply it to the live shop now and then we're sorted so thank you very much for your help.
You deserve a beer :-)![]()
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk
Thanks for the update that this does work for you ... good luck with your shop!![]()
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!]
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!
Hi Linda, I need your help again :-)
I have another problem now which is slightly related. I have just found out that all the categories on http://www.jakwater.co.uk will be Royal Mail Track and Trace apart from 'Chemicals' which will need splitting into two categories
Chemicals > First Class
Chemicals > Royal Mail Track and Trace
So applying your code is much easier apart from we need to display all the sub category products in the top level Chemicals category, not Chemicals > First Class and Chemicals Royal Mail Track and Trace
I decided that probably the easiest way of doing this would be to adapt the Products New Center Box and make it look like the product listing, then display that above the First Class (non flammable) and Track and Trace Categories (flammable).
However you can't display a buy now and product description by default.
I found your code to display a buy now on specials so wondered if this could be adapted? OR could the products be made so no matter if theres a sub category they all display in the top level category?
This was the code from your post about displaying a buy now button on specials.
http://www.zen-cart.com/forum/showth...utton+Specials
$products_link = '';
if (zen_has_product_attributes($specials_index->fields['products_id'])) {
$products_link = '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($specials_index->fields['master_categories_id']))) . '&products_id=' . $specials_index->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
} else {
$products_link = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $specials_index->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
}
$specials_index->fields['products_name'] = zen_get_products_name($specials_index->fields['products_id']);
$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsSpecials centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => (($specials_index->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . (int)$specials_index->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $specials_index->fields['products_image'], $specials_index->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($specials_index->fields['products_id']), 'cPath=' . $productsInCategory[$specials_index->fields['products_id']] . '&products_id=' . $specials_index->fields['products_id']) . '">' . $specials_index->fields['products_name'] . '</a><br />' . $products_price . '<br>' . $products_link);
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk
The best way to do the change is to look at the two files for the centerboxes in something like Beyond Compare from scootersoftware.com to see how they are very similar but differ from one another so that you can adapt that code to the new_products.php module ...
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!]
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!
Ok Linda, I didn't use beyond compare as it won't work on a mac and thats what I'm using.
Din't need anything like it. I've managed to update the new products center box listing code to include a quantity, description and add to cart button. The last thing I need to do is remove the random function from new_products.php
I've tried on line 50 replacing
if ($new_products_query != '') $new_products = $db->ExecuteRandomMulti($new_products_query, MAX_DISPLAY_NEW_PRODUCTS);
with
if ($new_products_query != '') $new_products = $db->Execute($new_products_query, MAX_DISPLAY_NEW_PRODUCTS);
But that stops the full display of products altogether and displays a single new product.
Ideally I would like them to display in alphabetical order if I can.
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk