Aller au contenu
  • Pas encore inscrit ?

    Pourquoi ne pas vous inscrire ? C'est simple, rapide et gratuit.
    Pour en savoir plus, lisez Les avantages de l'inscription... et la Charte de Zébulon.
    De plus, les messages que vous postez en tant qu'invité restent invisibles tant qu'un modérateur ne les a pas validés. Inscrivez-vous, ce sera un gain de temps pour tout le monde, vous, les helpeurs et les modérateurs ! :wink:

Aide sur un script database....


Jack54

Messages recommandés

Bonjour,

J'ai acheté un Template pour un petit commerce en ligne pour vêtements et autres.

J'ai rajouté deux boutons pour des chaussures (un numericStepper et un pour les pointures); et un autre pour des accessoires divers "ACC".

Cela fonctionne sauf au niveau du panier qui n'affiche pas le détail des commandes l'une au-dessous de l'autre, mais sur une même ligne.

Il n'affiche pas non plus les tailles de chaussures ajoutées au panier (sauf la pointure 34)...

Le total des prix est bon.

Je pense que mon fichier "database" est incomplet...

Le voici :

 

meuXML.onLoad = function()  
{ 
var childs:XMLNode = meuXML.firstChild; 
var childTotal:Number = childs.childNodes.length; 
_global.fcn = function()  
{ 
 for (var i = 0; i<childTotal; i++)  
 { 
  if (i != selecionado)  
  { 
   _parent.bar['bt'+i].enabled = true; 
   _parent.bar['bt'+i].useHandCursor = true; 
  } 
 } 
} 

//REMOVE PREVIOUSLY STORED MOVIECLIPS 
for (var i = 0; i<getTotal; i++)  
 { 
  _parent.bar['bt'+i].removeMovieClip(); 
 } 

_global.getTotal = childTotal; 
_parent.bar.bt._visible = false; 

//set variables 
var v:Number = 4; //How Many Columns 
var space:Number =2; //Space Between Products 
var xIni:Number = 0; //x Cordinates 
var yIni:Number = 0; //y Cordinates 
var rows = bt._width + space; 
var columns = bt._height + space; 

//Easing Effect 
function createColumns (s)  
{ 
 for (var i = 0; i<childTotal; i++)  
 { 
  posX = xIni + rows * (i % s); 
  posY = yIni + columns * int (i / s); 
  eval ("bt" + i).tween ("_x", posX, 0, "easeOutCubic", products.length); 
  eval ("bt" + i).tween ("_y", posY, 0, "easeOutCubic", products.length); 
 } 
} 


for (var i = 0; i<childTotal; i++) { 

 duplicateMovieClip ("bt", "bt" + i, i);//which item to duplicate 
 createColumns (v);//pass on the v variable ligne 27 

 /*************************/ 
 var nName    = (childs.childNodes[i].childNodes[0].firstChild.nodeValue); 
 var nPrice    = (childs.childNodes[i].childNodes[1].firstChild.nodeValue); 
 var nDescription = (childs.childNodes[i].childNodes[2].firstChild.nodeValue); 
 var nImage     = (childs.childNodes[i].childNodes[3].firstChild.nodeValue); 
 var nImageBig   = (childs.childNodes[i].childNodes[4].firstChild.nodeValue); 

 _parent.bar['bt'+i].picture._alpha = 0; 
 _parent.bar['bt'+i].picture.alphaTo(100,.3,'easeoutcubic',i*.15); 
 _parent.bar['bt'+i].picture.loadMovie(nImage) 

 //ONLOAD GET VARIABLES FROM XML 
 var loadName   = childs.childNodes[0].childNodes[0].firstChild.nodeValue; 
 var loadPrice    = childs.childNodes[0].childNodes[1].firstChild.nodeValue; 
 var loadDescription = childs.childNodes[0].childNodes[2].firstChild.nodeValue; 
 var loadImage   = childs.childNodes[0].childNodes[3].firstChild.nodeValue; 
 var loadImageBig  = childs.childNodes[0].childNodes[4].firstChild.nodeValue; 

 _parent.bar['bt'+i].nName    = nName 
 _parent.bar['bt'+i].nPrice    = nPrice 
 _parent.bar['bt'+i].nDescription = nDescription 
 _parent.bar['bt'+i].nImage    = nImage 
 _parent.bar['bt'+i].nImageBig   = nImageBig 

 //ADD SOUND 
 //clickSound = new Sound(); 
 //clickSound.attachSound("Click" ); // IMPORT YOUR AUDIO TO THE LIBRARY AND HAVE A LINKAGE ID NAMED "Click" 

 //PRODUCT ON ROLLOVER ACTION 
 _parent.bar['bt'+i].onRollOver = function()  
 { 
  this.fd_txt.colorTo(0xEBEBEB, 1); 
     //clickSound.start(); //REFER TO YOUR AUDIO ON WHICH EVER STATE 
 } 

 //PRODUCT ON ROLLOUT ACTION 
 _parent.bar['bt'+i].onRollOut = function()  
 { 
  this.fd_txt.colorTo(0xFFFFFF, 1); 
 } 

 //PRODUCT ON RELEASE ACTION 
 _parent.bar['bt'+i].onRelease = function()  
 { 
  this.fd_txt.colorTo(0xFFFFFF, 1); 
  _global.selecionado = this.i; 
  this.enabled = true; 
  this.useHandCursor = true; 
  fcn(); 

 //UPON RELEASE OF PRODUCT BUTTON - XML LOADS IMAGE / NAME / PRICE / DESCRIPTION ON TOP RIGHT 
  _parent._parent.orderform._visible = false; 
  _parent._parent.view_cart.gotoAndStop(1); 
  this._parent._parent.alvo.loadMovie(this.nImageBig) 
  this._parent._parent.des.description_txt.htmlText = "NOM DU PRODUIT: "+this.nName+"<br/><br/>"+"PRIX : € "+this.nPrice+"<br/><br/>"+this.nDescription; 

  this.onEnterFrame=function() 
  { 
      percent=Math.round((this._parent._parent.alvo.getBytesLoaded()/this._parent._parent.alvo.getBytesTotal())*100); 

   if(!isNan(percent)) 
   { 
         this._parent._parent.preloader._visible = true; 
   } 
      if(percent == 100) 
   { 
    this._parent._parent.preloader._visible = false; 
    delete this.onEnterFrame; 
      } 
  } 
/////////////////////////////////////////////////////////////////////////////////////< choix pour la sélection des produits 
  this._parent._parent.alvo._alpha = 0; 
  this._parent._parent.alvo.alphaTo(100,.3,'easeoutcubic',i*.05); 

 _parent._parent.quantity_ns.value = 1;//<<<<<<<< numeric stepper quantité 
 _global.NAME = this.nName; 
 _global.PRICE = this.nPrice; 
 _global.QUANTITY = 1; 
 _parent._parent.pointure_ns.value = 0;//<<<<<<<< numeric stepper pointure 
 _global.POINT = 34; 

 _parent._parent.small.onPress = function() // bouton Small 
  { 
  _parent._parent.total_fade.gotoAndPlay(2); 
     this._parent.additem(new _parent._parent.CartItem("S" + " " + NAME, PRICE, QUANTITY)); 
  } 
 _parent._parent.medium.onPress = function() // bouton Medium 
  { 
  _parent._parent.total_fade.gotoAndPlay(2); 
     this._parent.additem(new _parent._parent.CartItem("M" + " " + NAME, PRICE, QUANTITY)); 
  } 
 _parent._parent.large.onPress = function() // bouton Large 
  { 
  _parent._parent.total_fade.gotoAndPlay(2); 
     this._parent.additem(new _parent._parent.CartItem("L" + " " + NAME, PRICE, QUANTITY)); 
  } 
 _parent._parent.xlarge.onPress = function() // bouton XL 
  { 
  _parent._parent.total_fade.gotoAndPlay(2); 
     this._parent.additem(new _parent._parent.CartItem("XL" + " " + NAME, PRICE, QUANTITY)); 
  } 
 _parent._parent.divers.onPress = function() // bouton accessoires 
  { 
  _parent._parent.total_fade.gotoAndPlay(2); 
     this._parent.additem(new _parent._parent.CartItem("ACC" + " " + NAME, PRICE, QUANTITY)); 
  } 
 _parent._parent.point.onPress = function() // bouton pointures 
  { 
  _parent._parent.total_fade.gotoAndPlay(2); 
     this._parent.additem(new _parent._parent.CartItem("POINT" + " " + POINT, PRICE, QUANTITY)); 
  } 
 } 
} 

_parent.meuScroll.scroller._y = 0; //GET SCROLLBAR TO THE TOP 

//ONLOAD GET PICTURE + DESCRIPTION 
_parent.alvo.loadMovie(loadImageBig) 
_parent.des.description_txt.html = true; 
_parent.des.description_txt.htmlText = "NOM DU PRODUIT : "+loadName+"<br /><br />"+"PRIX : € "+loadPrice+"<br /><br />"+loadDescription; 
} 

Quelqu'un pourrat-il me venir en aide ?

Merci.

Cordialement,

Lien vers le commentaire
Partager sur d’autres sites

Rejoindre la conversation

Vous pouvez publier maintenant et vous inscrire plus tard. Si vous avez un compte, connectez-vous maintenant pour publier avec votre compte.
Remarque : votre message nécessitera l’approbation d’un modérateur avant de pouvoir être visible.

Invité
Répondre à ce sujet…

×   Collé en tant que texte enrichi.   Coller en tant que texte brut à la place

  Seulement 75 émoticônes maximum sont autorisées.

×   Votre lien a été automatiquement intégré.   Afficher plutôt comme un lien

×   Votre contenu précédent a été rétabli.   Vider l’éditeur

×   Vous ne pouvez pas directement coller des images. Envoyez-les depuis votre ordinateur ou insérez-les depuis une URL.

  • En ligne récemment   0 membre est en ligne

    • Aucun utilisateur enregistré regarde cette page.
×
×
  • Créer...