Friday, May 24th 2013, 9:44pm UTC+2

You are not logged in.

  • Login
  • Register

Entwicklung eines Moduls

Liath

Intermediate

Date of registration: Jul 20th 2009

Posts: 266

Thanks: 1

Location: München

Occupation: Webdesign/IT-Service

1

Sunday, August 9th 2009, 1:46am

Entwicklung eines Moduls

hi

ich bin grad dabei mir ein Zutatensystem zu schreiben, welches in die Produktdetails eingebettet werden soll. Dort habe ich in der:

(This term was hidden for guests. To be able to read it you should register!)

ein require eingebunden, das scheinbar ignoriert wird, da selbst bei falschen Pfad nichtmal eine Fehlermeldung kommt.

so in etwa siehts bei mir aus:

(This term was hidden for guests. To be able to read it you should register!)

an der entsprechenden Position im Template wollte ich dann mittels:

(This term was hidden for guests. To be able to read it you should register!)

die werte aus einer variablen in der gespeicherten PHP-Datei ausgeben lassen, die logischerweise durch das fehlende require nicht angezeigt werden.

wie oder wo kann ich ihm nun die php datei mittels eines require im template einbinden? Ich habs schon auf verschiedene Arten versucht...

(This term was hidden for guests. To be able to read it you should register!)

geht auch alles nicht

€dit: Titel mal dem bisherigen Threadverlauf angepasst
http://24lieferservice.de
H.H.G. multistore Small Business Edition - bislang 70 Mallshops
Rootserver - Intel Core i7 CPU 930 @ 2.80GHz - 24GB RAM

This post has been edited 1 times, last edit by "Liath" (Aug 12th 2009, 9:02pm)

  • Go to the top of the page

HHGAG

Sage

Date of registration: Jun 14th 2008

Posts: 15,330

Thanks: 37

Occupation: CEO

2

Sunday, August 9th 2009, 10:08am

Also PHP direkt im Template ist zwar nicht das wahre, aber Du musst wie folgt vorgehen:
Alle PHP aufrufe müssen in
(This term was hidden for guests. To be able to read it you should register!)
erfolgen, d.h.
(This term was hidden for guests. To be able to read it you should register!)
wahrscheinlcih wird sogar der absolute Pfad nötig sein und
(This term was hidden for guests. To be able to read it you should register!)
H.H.G. A.Ş.
Hasan H. Gürsoy (CEO)
--------------------------------------------------------------------------------------------------------------------
Shopsoftware - Shopsystem - Webshop - Onlineshop - Sanal mağaza - Sanal market - eTicaret
  • Go to the top of the page

Liath

Intermediate

Date of registration: Jul 20th 2009

Posts: 266

Thanks: 1

Location: München

Occupation: Webdesign/IT-Service

3

Sunday, August 9th 2009, 10:11am

naja... ich blick da noch nicht ganz durch, wie ihr das mit den modulen mach...

würds am liebsten auch anders lösen :/ wenn du einen anderen vorschlag hast :D

Update:

(This term was hidden for guests. To be able to read it you should register!)

funktioniert leider auch nicht :(
http://24lieferservice.de
H.H.G. multistore Small Business Edition - bislang 70 Mallshops
Rootserver - Intel Core i7 CPU 930 @ 2.80GHz - 24GB RAM

This post has been edited 1 times, last edit by "Liath" (Aug 9th 2009, 10:16am)

  • Go to the top of the page

HHGAG

Sage

Date of registration: Jun 14th 2008

Posts: 15,330

Thanks: 37

Occupation: CEO

4

Sunday, August 9th 2009, 10:30am

Modul Vorlage

Hast Recht eine Box Vorlage ist zwar im System, aber keine Modul Vorlage

Hier ein kleines HowTo:

(This term was hidden for guests. To be able to read it you should register!)


(This term was hidden for guests. To be able to read it you should register!)

Das hier ist die Grundstruktur, mit den Hauptbestandtielen eines Modules, das fetch Parsed alle bis zu dem Aufruf zugewiesenen Variablen mit dem Template und übergibt es als eine Zuweisung an das Template der Produktinfo. An der markierten Stelle gibst Du Deinen Script durch, alle
(This term was hidden for guests. To be able to read it you should register!)
usw Angaben änderst Du in diesen Stil um
(This term was hidden for guests. To be able to read it you should register!)



(This term was hidden for guests. To be able to read it you should register!)


(This term was hidden for guests. To be able to read it you should register!)

Hier kannst Du nun Dein Design in HTML platzieren, wenn wir das obige Beispiel vorführen, kannst Du nun
(This term was hidden for guests. To be able to read it you should register!)
an die gewünschte Stelle platzieren, wenn Du nicht mehr alle Variablen, die Du zuweist kennst, kannst Du diese mit
(This term was hidden for guests. To be able to read it you should register!)
in Erfahrung bringen.


(This term was hidden for guests. To be able to read it you should register!)

Zeile: 161

(This term was hidden for guests. To be able to read it you should register!)

ändern in:

(This term was hidden for guests. To be able to read it you should register!)

Mit dieser Änderung rufst Du Dein Modul auf.

Nun kann im Template der Produktinfo

(This term was hidden for guests. To be able to read it you should register!)

Die Variable
(This term was hidden for guests. To be able to read it you should register!)
an die gewünschte Stelle gesetzt werden. Und Dein Modul wird entsprechend angezeigt.
H.H.G. A.Ş.
Hasan H. Gürsoy (CEO)
--------------------------------------------------------------------------------------------------------------------
Shopsoftware - Shopsystem - Webshop - Onlineshop - Sanal mağaza - Sanal market - eTicaret
  • Go to the top of the page

Liath

Intermediate

Date of registration: Jul 20th 2009

Posts: 266

Thanks: 1

Location: München

Occupation: Webdesign/IT-Service

5

Sunday, August 9th 2009, 10:34am

woah :D geil

danke dir, da werd ich mich gleich direkt ransetzen und mein Glück versuchen... Du bist klasse :)
http://24lieferservice.de
H.H.G. multistore Small Business Edition - bislang 70 Mallshops
Rootserver - Intel Core i7 CPU 930 @ 2.80GHz - 24GB RAM
  • Go to the top of the page

HHGAG

Sage

Date of registration: Jun 14th 2008

Posts: 15,330

Thanks: 37

Occupation: CEO

6

Sunday, August 9th 2009, 10:52am

kein Problem =)
H.H.G. A.Ş.
Hasan H. Gürsoy (CEO)
--------------------------------------------------------------------------------------------------------------------
Shopsoftware - Shopsystem - Webshop - Onlineshop - Sanal mağaza - Sanal market - eTicaret
  • Go to the top of the page

Liath

Intermediate

Date of registration: Jul 20th 2009

Posts: 266

Thanks: 1

Location: München

Occupation: Webdesign/IT-Service

7

Sunday, August 9th 2009, 10:52am

noch ne frage dazu...

da ich das ganze in die product_info_v1.php einbauen will, aber für jeden Artikel ja verschiedene Templates gewählt werden können, welche Variable brauch ich da um das ausgewählte Template anzusprechen?

das dürfte doch:

(This term was hidden for guests. To be able to read it you should register!)

sein oder?
http://24lieferservice.de
H.H.G. multistore Small Business Edition - bislang 70 Mallshops
Rootserver - Intel Core i7 CPU 930 @ 2.80GHz - 24GB RAM
  • Go to the top of the page

HHGAG

Sage

Date of registration: Jun 14th 2008

Posts: 15,330

Thanks: 37

Occupation: CEO

8

Sunday, August 9th 2009, 10:56am

Nein, mach so wie ich es im Beispiel gemacht hab, so bleibst Du bei nem Update immer noch von den ganzen Änderungen verschont und brauchst nur ein Include und eine Variable einsetzen.
H.H.G. A.Ş.
Hasan H. Gürsoy (CEO)
--------------------------------------------------------------------------------------------------------------------
Shopsoftware - Shopsystem - Webshop - Onlineshop - Sanal mağaza - Sanal market - eTicaret
  • Go to the top of the page

Liath

Intermediate

Date of registration: Jul 20th 2009

Posts: 266

Thanks: 1

Location: München

Occupation: Webdesign/IT-Service

9

Monday, August 10th 2009, 1:12am

hmm ok, also nen eigenes modul zu schreiben ist mir doch noch etwas zu hoch... ich steig da irgendwie noch nicht ganz hinter...
was mir aber dabei aufgefallen ist, Du verwendest ja in der product_info.php und in der product_listing.php verschiedene funktionen für die anzeige des bestellbuttons und die verarbeitung zum warenkorb...

kannst du mir bitte erklären warum du da verschiedene nimmst und was sie im grunde bewirken? ich würd gerne eine der beiden funktionen nutzen und für mich anpassen, damit ich damit die zutaten zum artikel mit in den warenkorb packen kann, versteh aber nicht ganz was sie da bewirken und welches die richtige für mich ist.
http://24lieferservice.de
H.H.G. multistore Small Business Edition - bislang 70 Mallshops
Rootserver - Intel Core i7 CPU 930 @ 2.80GHz - 24GB RAM
  • Go to the top of the page

HHGAG

Sage

Date of registration: Jun 14th 2008

Posts: 15,330

Thanks: 37

Occupation: CEO

10

Monday, August 10th 2009, 10:00am

Auch als Modul ändert sich doch nicht für Dich, die Variablen sind die selben, packst nur die Verarbeitung in eine andere Datei. Alles was bis zum
(This term was hidden for guests. To be able to read it you should register!)
in der
(This term was hidden for guests. To be able to read it you should register!)
vorhanden ist, wird auch in Deinem Modul vorhanden sein, probiers aus :whistling:

Was das andere betrifft, es ist nicht eine andere Funktion, es wird nur anders übergeben, da bei der Produktinfo nur ein Produkt, in der Listing jedoch mehrere übergeben werden.
H.H.G. A.Ş.
Hasan H. Gürsoy (CEO)
--------------------------------------------------------------------------------------------------------------------
Shopsoftware - Shopsystem - Webshop - Onlineshop - Sanal mağaza - Sanal market - eTicaret
  • Go to the top of the page

Liath

Intermediate

Date of registration: Jul 20th 2009

Posts: 266

Thanks: 1

Location: München

Occupation: Webdesign/IT-Service

11

Monday, August 10th 2009, 9:33pm

also könnte ich quasi die Übermitlung wie in der Info auch in der Liste verwenden? Da würd ich mir gerne noch zusätzlich das Anzahl Feld einbauen :D

Aber ich werde wohl doch vorerst noch mit dem eigenen PHP-Code in der product.info_v1.html arbeiten, da ich das mit den Modulen echt noch nicht verstehe.

Ich wollte versuchen, mir aus einer eigenen Tabelle die Anzahl der Zutaten auslesen zu lassen, den Besitzer zuweisen (Zutatenbesitzer ist auch Produktbesitzer) und mir dann für die Staffelung alles in eine Variable schreiben zu lassen...

meine products_incredients.php bisher:

(This term was hidden for guests. To be able to read it you should register!)


keine Ahnung ob die Abfrage so geht... ich habs noch nicht getestet, da ich nicht weiss, wie ich ihm dann
  1. die gesetzte Variable $incr mitgebe
  2. die Informationen aus dem gesetzten Template $incredients_html an das Produktinfo Template weiterleite
meine incredients.html

(This term was hidden for guests. To be able to read it you should register!)
http://24lieferservice.de
H.H.G. multistore Small Business Edition - bislang 70 Mallshops
Rootserver - Intel Core i7 CPU 930 @ 2.80GHz - 24GB RAM
  • Go to the top of the page

HHGAG

Sage

Date of registration: Jun 14th 2008

Posts: 15,330

Thanks: 37

Occupation: CEO

12

Monday, August 10th 2009, 10:30pm

H.H.G. A.Ş.
Hasan H. Gürsoy (CEO)
--------------------------------------------------------------------------------------------------------------------
Shopsoftware - Shopsystem - Webshop - Onlineshop - Sanal mağaza - Sanal market - eTicaret
  • Go to the top of the page

Liath

Intermediate

Date of registration: Jul 20th 2009

Posts: 266

Thanks: 1

Location: München

Occupation: Webdesign/IT-Service

13

Monday, August 10th 2009, 11:09pm

klasse, Danke Dir für das anpassen der Abfrage und die Erklärung... im Moment bekomme ich aber noch den Hinweis:

(This term was hidden for guests. To be able to read it you should register!)
irgendwo scheint da noch ein Fehler drin zu sein...

das include hab ich in die product_info.php mal nach ganz oben gepackt, da ich noch nicht weiss wo genau das da hinmüsste

(This term was hidden for guests. To be able to read it you should register!)

daran liegt das nicht oder?

die Zeile

(This term was hidden for guests. To be able to read it you should register!)

hab ich mal rausgenommen, da
  1. $incr_num ja nirgends mehr gesetzt wird
  2. ich die nicht wirklich brauche
http://24lieferservice.de
H.H.G. multistore Small Business Edition - bislang 70 Mallshops
Rootserver - Intel Core i7 CPU 930 @ 2.80GHz - 24GB RAM
  • Go to the top of the page

HHGAG

Sage

Date of registration: Jun 14th 2008

Posts: 15,330

Thanks: 37

Occupation: CEO

14

Monday, August 10th 2009, 11:13pm

Ganz oben ist ganz ganz schlecht, wohin es hin kommt habe ich Dir in Beitrag #4 geschrieben, Änderungen Zeile 161
Wenn der Fehler danach immer noch bleiben sollte, findest Du die Fehlermeldung selbst unter
(This term was hidden for guests. To be able to read it you should register!)
H.H.G. A.Ş.
Hasan H. Gürsoy (CEO)
--------------------------------------------------------------------------------------------------------------------
Shopsoftware - Shopsystem - Webshop - Onlineshop - Sanal mağaza - Sanal market - eTicaret
  • Go to the top of the page

Liath

Intermediate

Date of registration: Jul 20th 2009

Posts: 266

Thanks: 1

Location: München

Occupation: Webdesign/IT-Service

15

Monday, August 10th 2009, 11:23pm

Ganz oben ist ganz ganz schlecht, wohin es hin kommt habe ich Dir in Beitrag #4 geschrieben, Änderungen Zeile 161

stimmt ja :D dann hatte ich es doppelt drin :whistling: habs aber wieder rausgenommen, Fehlermeldung wie folgt 8|

(This term was hidden for guests. To be able to read it you should register!)
da ist doch kein LIMIT mehr drin in der Abfrage 8|
http://24lieferservice.de
H.H.G. multistore Small Business Edition - bislang 70 Mallshops
Rootserver - Intel Core i7 CPU 930 @ 2.80GHz - 24GB RAM
  • Go to the top of the page

HHGAG

Sage

Date of registration: Jun 14th 2008

Posts: 15,330

Thanks: 37

Occupation: CEO

16

Monday, August 10th 2009, 11:26pm

H.H.G. A.Ş.
Hasan H. Gürsoy (CEO)
--------------------------------------------------------------------------------------------------------------------
Shopsoftware - Shopsystem - Webshop - Onlineshop - Sanal mağaza - Sanal market - eTicaret
  • Go to the top of the page

Liath

Intermediate

Date of registration: Jul 20th 2009

Posts: 266

Thanks: 1

Location: München

Occupation: Webdesign/IT-Service

17

Monday, August 10th 2009, 11:31pm

http://24lieferservice.de
H.H.G. multistore Small Business Edition - bislang 70 Mallshops
Rootserver - Intel Core i7 CPU 930 @ 2.80GHz - 24GB RAM
  • Go to the top of the page

HHGAG

Sage

Date of registration: Jun 14th 2008

Posts: 15,330

Thanks: 37

Occupation: CEO

18

Monday, August 10th 2009, 11:43pm

Du bist Dir sicher, dass Dein
(This term was hidden for guests. To be able to read it you should register!)
um die Zeile 161 ist?
H.H.G. A.Ş.
Hasan H. Gürsoy (CEO)
--------------------------------------------------------------------------------------------------------------------
Shopsoftware - Shopsystem - Webshop - Onlineshop - Sanal mağaza - Sanal market - eTicaret
  • Go to the top of the page

Liath

Intermediate

Date of registration: Jul 20th 2009

Posts: 266

Thanks: 1

Location: München

Occupation: Webdesign/IT-Service

19

Monday, August 10th 2009, 11:47pm

aus irgendeinem Grund ist es bei mir nicht Zeile 161, aber habs so wie Du gesagt hattest eingefügt:


(This term was hidden for guests. To be able to read it you should register!)


das include ist derzeit in zeile 184 bei mir... an der Datei wude meinerseits aber nichts verändert, so das es nach unten gerutscht sein könnte
http://24lieferservice.de
H.H.G. multistore Small Business Edition - bislang 70 Mallshops
Rootserver - Intel Core i7 CPU 930 @ 2.80GHz - 24GB RAM
  • Go to the top of the page

HHGAG

Sage

Date of registration: Jun 14th 2008

Posts: 15,330

Thanks: 37

Occupation: CEO

20

Monday, August 10th 2009, 11:50pm

H.H.G. A.Ş.
Hasan H. Gürsoy (CEO)
--------------------------------------------------------------------------------------------------------------------
Shopsoftware - Shopsystem - Webshop - Onlineshop - Sanal mağaza - Sanal market - eTicaret
  • Go to the top of the page