close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

show region utility...

Thread began 10/11/2013 9:14 am by Jamie | Last modified 10/11/2013 1:36 pm by Jamie | 1813 views | 8 replies |

Jamie

show region utility...

Hey Jason

Have been scratching my head most of today trying to ffigure out why the, in the attached image, the cta is missing on the right. They are identical pages in structure (just not specific content) and on one page the christmas cta is visible but the other one it isnt.

I am pretty sure that its to do with the show region utility but for the life of me cant figure out why. Have put details in the PM area.

Thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

the show if is based on the value in the ProductSeasonal column of the WADAproducts recordset being equal to 1, so the first thing to check is that recordset value.
just after the body tag, add the following code to write the ProductSeasonal value to the page:

php:
<?php echo("ProductSeasonal: ".$row_WADAproducts['ProductSeasonal']."<br />"); ?>
Sign in to reply to this post

Jamie

ok have done tat and the one that isnt showing has ProductSeasonal: 0 and the one that is showing has ProductSeasonal: 1

I can see where this is going as there on the gift-bags.php page there are no items that have been 'checked' as seasonal but on another page (ribbons-twine.php) there are a number of products that have been checked as seasonal but on that page, the cta isnt showing either... hence my confusion!

Sign in to reply to this post

Jason ByrnesWebAssist

  but on another page (ribbons-twine.php) there are a number of products that have been checked as seasonal but on that page, the cta isnt showing either  



Well, the show region is only looking at the current (First) record in the recordset.

It does not loop through the recordset to see if any of the columns in the recordset have seasonal set to 1, it is just looking at the first one. you would need to hand code a loop through the recordset to see if any of the records have a value of 1.

Sign in to reply to this post

Jamie

how would I do that?

Sign in to reply to this post

Jason ByrnesWebAssist

untested, but this should dod the trick:

<?php 
$showSeasonal = 0;
do {
if($row_WADAproducts['ProductSeasonal'] == "1") {
$showSeasonal = "1";
break;
}
} while ($row_WADAproducts = mysql_fetch_assoc($WADAproducts));
mysql_data_seek($WADAproducts, 0);
$row_WADAproducts = mysql_fetch_assoc($WADAproducts);
?>
<?php if($showSeasonal == "1") { ?>
<Seasonal Div here>
<?php } ?>
Sign in to reply to this post

Jamie

am afraid theres no change

Replaced the include with the above (obviously changing the <div> with my own and some of the pages still not showing the cta whilst others are

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

Jamie

see PM

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...