Ahojte,
pomáham zpojazdniť jednu funkciu na svokrovom eshope, ktorý funguje pod Upgates systémom.
Jedná sa o spojazdnenie konverzného kódu - čiže odoslanie info o nákupe pre maďarský ekvivalent Heureky.
Je na to viac metód, na FTP neviem nahrať .php súbory, takže by som využil API - ASP Classic , nakoľko .asp viem nahrať.
Mám však trošku problém s modifikovaním príkladového súboru, nakoľko s takýmto programovaním nemám žiadne skúsenosti. skončil som pri HTML a CSS.
Návod z porovnávača hovorí:
Citácia:
• You have to customize the inserted code as follows:
• Modify
<!--#include file="..."--> parts according to the paths where you placed
your .asp files.
• Check the WebApiKey in the constructor and if it differs from your partner's WebApiKey, you
have to replace it.
• Set the customer's e-mail address with the
SetEmail() method.
• Add the purchased products with the
AddProduct() method. It's callable multiple times and
you should iterate through the customer's cart probably. It's first parameter is required and it
must be the product name. The second parameter should be the product identifier, which is the
same as in the partner feed, but it's optional.
- odkaz na nahrané súbory som samozrejme doplniť vedel
- web api key som nahrať vedel
SetEmail() -
v príkladovom súbore je :
Kód:
' Provide the e-mail address of your customer. You can retrieve the e-amil address from the webshop engine.
Client.SetEmail("somebody@example.com")
Systém Upgates má zástupcov - premenné na rôzne údaje - v tomto prípade:
upgates.order.customer.email - Email zákazníka z objednávky.
Stačí teda nahradiť na toto, alebo to má byť rovnako v úvodzovkách, ako aj v prípade zadanej emailovej adresy?
Kód:
Client.SetEmail(upgates.order.customer.email)
A samozrejme, takisto mám problém s odoslaním zakúpených produktov. Prílkadový súbor má v sebe nasledovné, avšak AddProduct() tam nevidím.
Má sa pod dim produkt, konkrétne za product1(0) a 1 takisto len dať priamo premenná, konkrétne:
upgates.order.products[].code - Kód objednaného produktu|varianty.
upgates.order.products[].title - Název objednaného produktu|varianty.
Kód:
' Example products
Dim Product1(1)
Product1(0) = "Name of first purchased product"
Product1(1) = "AAA111"
' If only product name is available
Dim Product2(0)
Product2(0) = "Name of second purchased product"
' Customer's cart example
Dim Cart(1)
Cart(0) = Product1
Cart(1) = Product2
' Provide the name and the identifier of the purchased products.
' You can get those from the webshop engine.
' It must be called for each of the purchased products.
For Each Product In Cart
' If both product name and identifier are available, you can provide them this way:
Client.AddProduct Product
' If neither is available, you can leave out these calls.
Ďakujem ak dáte nejaké tipy, poprípade web kde sa o tom trošku viem poobzerať, čo ako funguje.