mariovaldez.net

MV.net forums
It is currently 14 Jul 2016, 00:59

All times are UTC - 7 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject:
PostPosted: 04 Oct 2004, 02:28 
** Un añadido util por lo menos para mi y para alguien más sería de forma genérica:

Tengo un script en PHP que es novedad.php y sólo hay q pasarle como parámetro el id del producto y dicho producto aparecería el primero en la página principal.

Pues para hacerlo de forma genérica:
En las opciones poner una pestaña con lo siguiente:
(con X las que queremos tener activas)

[X] NOMBRE1 URL1
[ ] NOMBRE2 URL2
[ ] NOMBRE3 URL3
....
Entonces en el nombre ponemos el nombre de la funcion, por ejemplo "Poner como Novedad" y en url ponemos "http://tienda.com/admin/novedad.php?id="

Al pulsar sobre un producto con el boton derecho además de las opciones por defecto aparecería una más que sería "Poner como Novedad" y al pinchar cargaría la url "http://tienda.com/admin/novedad.php?id=XXXX" donde XXXX es el numero del producto y novedad.php es un script en php que pondría ese producto como novedad (el primero de la página principal).
Si no se ha entendido avisa y lo explico mejor :)


Report this post
Top
  
Reply with quote  
 Post subject: Custom PHP call...
PostPosted: 14 Oct 2004, 17:01 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
Guest:

(I answered in Spanish but also translated your message and my answer to English so most people can understand this post).


> Tengo un script en PHP que es novedad.php
> y sólo hay q pasarle como parámetro el id del
> producto y dicho producto aparecería el primero
> en la página principal. Pues para hacerlo de
> forma genérica: En las opciones poner una
> pestaña con lo siguiente: (con X las que queremos
> tener activas)
> [X] NOMBRE1 URL1
> [ ] NOMBRE2 URL2
> [ ] NOMBRE3 URL3
> Entonces en el nombre ponemos el nombre de
> la funcion, por ejemplo "Poner como Novedad"
> y en url ponemos "http://tienda.com/admin/
> novedad.php?id=" Al pulsar sobre un producto
> con el boton derecho además de las opciones por
> defecto aparecería una más que sería "Poner como
> Novedad" y al pinchar cargaría la url
> "http://tienda.com/admin/novedad.php?id=XXXX"
> donde XXXX es el numero del producto y
> novedad.php es un script en php que pondría
> ese producto como novedad (el primero de la
> página principal). Si no se ha entendido avisa y

> lo explico mejor

Ya te entiendo. Practicamente es una forma de extender la funcionalidad de la aplicación usando scripts PHP en el servidor. Tuve qué leer un par de veces tu mensaje y pensarlo un par de días y me parece una excelente idea. 8)

Sólo necesito pensar bien cómo hacer una interfase de configuración lo suficientemente flexible para poder pasar cualquier parámetro al script. He tomado nota de tu sugerencia. :wink:



> I have a PHP script named novelty.php
> and you only have to pass the id of the product
> as parameter and that product will be listed
> first in the main page. Well, to do it in a
> generic way: in the options add a tab with the
> following: (with X marked those we want active)
> [X] NAME1 URL1
> [ ] NAME2 URL2
> [ ] NAME3 URL3
> Then in the name we use the name of the function,
> for example "Tag as Novelty" and in the URL we use
> "http://tienda.com/admin/novelty.php?id=". So,
> when we click on the product with the right button,
> along with the defaul options it would appear a
> new one named "Tag as Novelty" and when clicked it
> would load the URL "http://tienda.com/admin/novelty.php?id=XXXX"
> where XXXX is the number of the product and
> novelty.php is the PHP script that would tag the
> product as novelty (the first of the main page).
> If you can't understand it tell me and I'll
> explain it better.

I understand you now. Actually this is a way to extend the features of the application using PHP scripts in the server. I had to read your message a couple of times and think about it a couple of days and I think it is a great idea. 8)

I only need to think carefully how to build a configuration interface flexible enough to be able to pass any parameter to the script. I've taken note of your suggestion. :wink:


Regards,

Mario A. Valdez-Ramirez.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group