Two Collapso Issues

Expanding / Collapsing, search engine friendly, Section menu.
Post Reply
caite
Posts: 4
Joined: Mon Jun 26, 2006 2:37 pm

Two Collapso Issues

Post by caite »

Firstly my little + and - images don't show and I can't figure out why for the life of me. They are there in theory, clicking on where they ought to be makes the menu function as it should, but the images are just invisible. any ideas?

Second - since installing the menu I've added new sections/subsections to the site - but they aren't showing. How do I force it to recognise the changes?

Cheers
Caite
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

The images need to be uploaded via Advanced / Additional Files. Also if you use this menu on your Brochure home page you should manuallly FTP a copy of these images to your site root.

Also the menu should be updated automatically at every site UPdate or Refresh. You shouldn't have to do anything in a day-to-day manner. Do you have an URL so I can see the problems?
Norman
caite
Posts: 4
Joined: Mon Jun 26, 2006 2:37 pm

Post by caite »

Doh! Who'd have thought it was something as easy as just uploading the images!

As to the other problem - it has now updated itself. It was probably a couple of hours before it changed though. Did another change to my sections today and it also took a little while to filter through to collapso, I probably did updates to the website about 3 or 4 times before it showed.
Don't worry about it though - as long as I know it will change eventually I'm happy!

Changing the subject though ... I'm just trying to implement your patch for having the add to cart on the extended info popup. I'm having a problem in that I can't make it work - it all looks fine, but clicking on the button doesn't add anything to the cart. I can't figure out where I've gone wrong - I've not made any changes to the code as you give, just copied and pasted. I've made various changes to the productline.html template, so wonder if that's the source of my grief. Shopping mode is currently set to 'quantity in shopping cart' if that makes a difference.

http://www.tuppys.co.uk/acatalog/Thimbles.html

Any advice would be much appreciated!
Caite

ps. I know it's donationware for that - I'm planning to see just how many of your patches I decide to use in my final site before I pay one lump sum :-)
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

Regarding the Add to Cart on the popup. The readme says make a file in SIte1 called popupsupprt.js from the following

Code: Select all

// START POPUP WITH ADD TO CART SUPPORT
var noreferrer = false;
var oktosubmit = false;
var singleadd = false;
function setitup(prodref) {
var undef;
// (V11) use unique name from source window as target
if ( opener ) 
  {
  if ( opener.WindowName ) document.forms.popform.target = opener.WindowName;   // Netscape needs the long-winded name
  // look through all parent forms 'till one containing field SID
  var of = opener.document.forms;
  var i = of.length - 1;
    for ( var j = 0; j <= i; j++)
    {
    var k = of[j].length - 1; 
    for ( var l = 0; l <= k; l++) 
      {
      if ( of[j].elements[l].name == 'PU_' + prodref ) 
        {
        // patch in values from calling page
        document.forms.popform.SID.value = of[j].SID.value;
        document.forms.popform.action = of[j].action;
        if ( of[j].SINGLEADD ) singleadd = true;
	if ( noreferrer ) 
	  {
	  document.forms.popform.ACTINIC_REFERRER.value = opener.location.href;
	  }
	else
	  {
	  document.forms.popform.ACTINIC_REFERRER.value = of[j].ACTINIC_REFERRER.value;
	  }
        document.forms.popform.PAGEFILENAME.value = of[j].PAGEFILENAME.value;
        return true;
        } 
      }
    }
  }
// should never get here but...
alert("Cannot find product." 
    + "\nMake sure that the main page is still displaying the product and try again."
    + "\n(<input type=hidden disabled name=\"PU_NETQUOTE" + "VAR:PRODUCTREFERENCE\"> not found in Product Template)");

setTimeout("window.close()",2000);  // defer the window close for Netscape & Opera
return false;
}
function doit() {
  setTimeout("window.close()",500);  // defer the window close for Netscape & Opera
  return oktosubmit;
}
// END POPUP WITH ADD TO CART SUPPORT
You've done this but somehow the code has ended up on your server as one long line. The line breaks (as above) are essential. Copy / Paste the code above into Notepad and then save it in Site1 as popupsupprt.js and see if all's now well.
Norman
caite
Posts: 4
Joined: Mon Jun 26, 2006 2:37 pm

Post by caite »

AH! Thanks so much Norman - that's done the trick. I had to go into addtocart_extendedinfo and perform the same operation - putting all those line breaks in where they ought to be, but once I did it was all up and functioning.

It's a great tip, I'll now watch out for that if I have problems in future - I'm so used to html where line breaks don't matter, it didn't even occur to me to check that. :lol:
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

Weird, those line breaks going missing. What a lot of work.

I never have any problems when copying / pasting these files into Notepad (although I generally use EditPad as my text editor).

What were the steps you took that caused the line breaks to disappear?
Norman
caite
Posts: 4
Joined: Mon Jun 26, 2006 2:37 pm

Post by caite »

I just went for the old right-click copy - right-click paste. I'm using homesite to edit with though - I suspect that's where it went odd. It's just a text editor - not one of your wysisygs or anything - but it probably thought it was being helpful by removing the line breaks.
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Post by norman »

That would be it. HomeSite is an HTML editor and it assumed that everything was HTML and could be compacted. I'll add reminders to use Notepad when I next update these ReadMe's.
Norman
Post Reply