Jump to content

[SOLVED - VYRESENO]Presmerovani po dokonceni objednávky - cashondeliverywithfee


dakrcz

Recommended Posts

Zdravim,

mam takovy problem s modulem cashondeliverywithfee, ktery nepresmeruje po dokonceni objednavky na spravnou adresu order-confirmation.php ale do historie objednavek.

Tato vlastnost je velice neprijemna protoze se neda dobre sledovat zakaznik pomoci goals ( cile ) ani sekce commerce v google analytics. Resil jste do nekdo ??

Verze presty 1.3.1.1

diky


PS: prikladam modul, ktery presmerovava na historii

cashondeliverywithfee.zip

Link to comment
Share on other sites

Takze jak na to :)

Po zjisteni co se deje po potvzeni objednávky pomoci odchytavani http hlavicek sem zjistil ze modul spravne presmeruje na order-confirmation.php ale ten hned presmerovava kodem 302 do sekce historie.
Prozkoumal sem tedy order-confirmation.php a zjistil ze je nekolik podminek, ktere kdyz nejsou splneny tak presmeruje. Otevrel sem tedy /modules/cashondeliverywithfee/validation.php a zjistil ze se nepouziva promenna secure_key v url adrese, takze byla doplnena, pridana promenna $customer a do slozky /modules/cashondeliverywithfee/ nakopirovam soubor sablony confirmation.tpl z modulu cashonpickup.


1) soubor /modules/cashondeliverywithfee/validation.php

puvodni - radek muzete zakomentovat pomoci pridani // na zacatek radku

Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?id_cart='.intval($cart->id).'&id;_module='.intval($cashOnDelivery->id).'&id;_order='.intval($cashOnDelivery->currentOrder));



nahradit

Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?key='.$customer->secure_key.'&id;_cart='.intval($cart->id).'&id;_module='.intval($cashOnDelivery->id).'&id;_order='.intval($cashOnDelivery->currentOrder));




2) soubor /modules/cashondeliverywithfee/validation.php

pred radek

$cashOnDelivery = new CashOnDeliveryWithFee();



vlozit

$customer = new Customer(intval($cart->id_customer));



asi takto

/* Validate order */
if ($confirm)
{
   $customer = new Customer(intval($cart->id_customer));
   $cashOnDelivery = new CashOnDeliveryWithFee();
   ...
   ...
   ...




3) zkopirovat soubor

z

/modules/cashonpickup/confirmation.tpl 



do

/modules/cashondeliverywithfee/confirmation.tpl 





Po teto uprave chodi v 1.3.1.1 jak by melo, ale pokud si to budete upravovat tak si vzdycky otestujte na zkusebni instalaci funkcnost. :)

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...