After much hair pulling, I've managed to come up with a sort of solution to my initial problem (and I believe a few other of your) problem...... which is how to use this mod when you have some products that have attributes OTHER THAN dropdowns because currently you can't....And I've gotten far and will post the entire work around when it's complete so I don't confuse anyone....but my current question may just be a simple zencart/mysql/php question:
I added a flagged field to the 'products' table via phpmyadmin then when the tpl_product_info_display.php page (includes/templates/YOURTEMPLATE/templates) loads, around line 134, right after where the code to 'display the product attributes' is, I have put in an if/else statement that says that if that product is 'flagged' then /tpl_modules_attributes.php will load, and if not, then /tpl_modules_attributesversion2.php will load. Now I know that statement works because
Code:
<?php
/**
* display the product atributes
*/
if ($_GET['products_id'] < 2) {
require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php');
}
else {
require($template->get_template_dir('/tpl_modules_attributestemp.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributestemp.php'); }
}
?>
Will indeed load the one page for all products with a product_id less than2, and the other page for all others.... what I'm having a problem doing is changing the 'product_id' to the new 'flagged' field in the same table. I can indeed PRINT the 'flagged' value (either 0 or 1) by plugging in:
Code:
<?php echo $product_info->fields['flagged']; ?>
but I can't figure out how to correctly replace
Code:
if ($_GET['products_id'] < 2) {
with something like
Code:
if ($_GET['flagged'] = 2) {
...
Bookmarks