Jump to content

stolea

New Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by stolea

  1. Ah.. thanks. Learnt a few more things I did the echo as suggested and discovered that it is picking up the value of $sectionname == 'Collars', but bombs out on $productname == 'Collar' . the problem is that the product name is something like "38mm collar with spikes" and the $prodname is looking for a product called "Collar" Soooo..... how do I say "look for the word "collar" or "Collar" in a string of words."? I tried if ( $sectionname == 'Belts' || (strpos($productname, 'belt') !== false ) {echo $sectionname, $productname;} but that just gave an error message about an unexpected {
  2. I just tried the following version of your code if ( $sectionname == 'Collars' || $productname == 'Collar' ) { echo '<p class="measurelink noprint">Remember to <a href="neckmeasurepop.php" class="lnkpopup sllink" title="click for popup measuring instructions" onclick="slf_popupwin();return false;">Measure Your Collar Size !</a></p>'; } and that works Silly question: what is the difference between ?? and ||
  3. Thanks fastol, did as suggested but it displays nothing in either base or subcategory (:
  4. Hi, I have a website that is 80% done when my programmer dropped the ball. I am trying to get it all to work, but have only rudimentary knowledge on what I am doing thus far and need a bit of help, please. I have a couple of popups links that writes a reminder to check the size of necks and arms at the top of certain pages. One of my product groups is called Collars and Armbands which consists of 1 x category "Collars and Armbands" whic has 2 x Subcategories which are "Collars" and "Armbands" if I click on the "Collars and Armbands" tab, it displays all the contents of both subcategories Collars and Armbands, as expected. It displays the popup links for both subcategories. I don't want the popups to appear on the "Collars and Armbands" page but only on the individual "Collars" or "Armbands" pages if I click on Collars or Armbands subcategory tabs it displays the single popup link for that category. (which is what I want it to do) The problem lies in the category and subcategory names which I can't really change without making it non-logical for the customer. this the code that makes is happen if ( substr_count($sectionname,'Collars')>0 || substr_count($productname,'Collar')>0 ) { echo '<p class="measurelink noprint">Remember to <a href="neckmeasurepop.php" class="lnkpopup sllink" title="click for popup measuring instructions" onclick="slf_popupwin();return false;">Measure Your Collar Size !</a></p>'; } My question is, is there a way to set a condition that I can use for this code that says "if the $sectionname = "Collars" but NOT "Collars and Armbands" and $productname = "Collar" then display the popup link "neckmeasurepop.php". I had considered renaming the base category to something else, but that would just make things confusing for the customers. Cheers and thanks in advance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.