I haven't viewed the source code for the page, but I do notice that the above code doesn't have: MYHIDDENATTRIBUTESDIV defined/replaced.
I haven't viewed the source code for the page, but I do notice that the above code doesn't have: MYHIDDENATTRIBUTESDIV defined/replaced.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
That kind of works BUT it puts it in the wrong place.
See this line <h4 class="optionName back"><div id="MYHIDDENATTRIBUTESDIV" style="background-color:#ffffcc;">Finishing Options</h4>
I need it outside <h4 class="optionName back">
So like this
<div id="MYHIDDENATTRIBUTESDIV" style="background-color:#ffffcc;"><h4 class="optionName back">Finishing Options</h4>
and for the end
currently it is like this <h4 class="optionName back"><label class="attribsUploads" for="attrib-46-0">Upload your artwork</label></div></h4>
and should be
</div><h4 class="optionName back"><label class="attribsUploads" for="attrib-46-0">Upload your artwork</label></h4>
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk
So, then back to having to put that code (probably as originally written in the file that calls attributes.php, which I seem to think is a template file. Possibly the easier way to identify that is to use the variable I said to replace in a search through tools->developer's toolkit. And see which file(s) that appears in. Then in the loop that displays al of the applicable attributes, add that code.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
This is the full code for tpl_modules_attributes.php. Note I have added coded and used $options_name
<?php
/**
* Module Template
*
* Template used to render attribute display/input fields
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_modules_attributes.php 3208 2006-03-19 16:48:57Z birdbrain $
*/
?>
<div id="productAttributes">
<?php if ($zv_display_select_option > 0) { ?>
<h3 id="attribsOptionsText"><?php echo TEXT_PRODUCT_OPTIONS; ?></h3>
<?php } // show please select unless all are readonly ?>
<?php
for($i=0;$i<sizeof($options_name);$i++) {
?><div id="<?php echo $options_wrapper_id[$i];//gjh42 ?>" class="wrapperAttribsOptions">
<?php
if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {
?>
<h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3>
<?php
}
?>
<?php /* MY CODE STARTS HERE */ ?>
<?php if (stristr($options_name->fields['products_options_name'],'Finishing Options')) { ?><div id="MYHIDDENATTRIBUTESDIV"><?php } ?>
<?php /* MY CODE ENDS HERE */ ?>
<h4 class="optionName back"><?php echo $options_name[$i]; ?></h4><div style="clear:both;" /></div><div class="back"><div id="productattributesheaderbg"></div><div id="productattributesmidbg"><?php echo "\n" . $options_menu[$i]; ?><br style="clear:both;" /></div><div id="productattributesfooterbg"></div></div>
<?php if ($options_comment[$i] != '' and $options_comment_position[$i] == '1') { ?>
<div class="ProductInfoComments"><?php echo $options_comment[$i]; ?></div>
<?php } ?>
<?php
if ($options_attributes_image[$i] != '') {
?>
<?php echo $options_attributes_image[$i]; ?>
<?php
}
?>
<br class="clearBoth" />
<?php
}
?>
<?php
if ($show_onetime_charges_description == 'true') {
?>
<div class="wrapperAttribsOneTime"><?php echo TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION; ?></div>
<?php } ?>
<?php
if ($show_attributes_qty_prices_description == 'true') {
?>
<div class="wrapperAttribsQtyPrices"><?php echo zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_green.gif', TEXT_ATTRIBUTES_QTY_PRICE_HELP_LINK, 10, 10) . ' ' . '<a href="javascriptopupWindowPrice(\'' . zen_href_link(FILENAME_POPUP_ATTRIBUTES_QTY_PRICES, 'products_id=' . $_GET['products_id'] . '&products_tax_class_id=' . $products_tax_class_id) . '\')">' . TEXT_ATTRIBUTES_QTY_PRICE_HELP_LINK . '</a>'; ?></div>
<?php } ?>
</div><br class="clearBoth" />
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk
Good choice, but not quite. At this point $options_name is referenced as an array through [$i] so would need to use $options_name[$i] instead. That and placed where desired should work though I. Also don't remember how stristr works. I assume it means if the text on the right is in the string to the left, then return true.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Haven't heard back, assume this resolved the issue?
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
No, I'd just finished for the day.
Come back to it this morning and have tried a few options but none seemed to work.
Then tried this which although doesn't what I want does display the DIV outside the h4 tag, it just displays on every attribute.
<?php
if ($options_name[$i] != 'Finishing Options') { echo '<div id="MYHIDDENATTRIBUTESDIV" style="background-color:#ffffcc;">';
?><?php
}
?>
Also tried this:
<?php
if ($options_name[$i] != fields['products_options_name'],'Finishing Options') { echo '<div id="MYHIDDENATTRIBUTESDIV" style="background-color:#ffffcc;">';
?><?php
}
And this:
<?php
if ($options_name[$i] != fields['options_name'],'Finishing Options') { echo '<div id="MYHIDDENATTRIBUTESDIV" style="background-color:#ffffcc;">';
?><?php
}
?>
?>
Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk