sameday-courier / prestashop-plugin

Prestashop (1.6 and 1.7 versions) plugin for Sameday Courier shipping
Other
4 stars 7 forks source link

no locker selected #55

Open iulianm16 opened 2 years ago

iulianm16 commented 2 years ago

I noticed that if no locker is selected, the client does not receive any error and can place the order.

bluegifts commented 2 years ago

true, it.s not marked as mandatory so client is not forced to select a locker.

iulianm16 commented 2 years ago

I fixed this.

bluegifts commented 2 years ago

i was referring to the module that is not mandatory the selection of the locker and this is why he can place the order without chosing a locker when the carrier easy box is selected. so we can mark from the theme template but only as visual info.

iulianm16 commented 2 years ago

I have added a function in module that checks when you go to the next step, whether you have selected the locker or not. The locker must be selected mandatory as the awb cannot be generated without it.

bluegifts commented 2 years ago

can you share it? :)

iulianm16 commented 2 years ago
public function hookActionValidateStepComplete($params){

    $lockerId = (int) isset($_COOKIE['samedaycourier_locker_id']) ? $_COOKIE['samedaycourier_locker_id'] : 0;
    $service = SamedayService::findByCarrierId($params['cart']->id_carrier);

    if( $lockerId === 0 && $params['step_name'] == 'delivery' && $service['code'] === self::LOCKER_NEXT_DAY ) {
        $this->context->controller->errors[] = $this->l('Please select a pickup branch!');
        $params['completed']  = false;
    }
}

this is the function and add $this->registerHook('actionValidateStepComplete') to install() function.

bluegifts commented 2 years ago

can this be implemented in a future update? keep receiving orders without selecting the locker id.

Valentin-Iacobescu commented 2 years ago

The developers of the module do not want to make the choice of a locker mandatory, which is essential, because otherwise, if this field of choosing a locker is not mandatory, errors appear on the admin order page when we generate the awb in connection with the id locker.

Of course the issue appear in admin order page, if the client does not choose any locker. The fact that this field is not mandatory makes a large part of this module useless. That field for choosing a locker is essential, but it seems that the developers of this module choose to make fun of us.

We installed the module in our store and there are many customers who do not choose a locker when completing the order, so we do not know where to deliver the order and we have to call them one by one by phone to ask them where to deliver the parcel. IF this field is not required, this module is useless.

I've been reporting this issue to developers for over half a year and they just don't want to fix it. They could solve this issue, probably, in about 15-30 minutes, to make the choice of a locker mandatory. It seems that they do not care about this huge issue. Too bad!

bluegifts commented 2 years ago

puteti scrie in romana, sunt de-ai nostri :) speram ca intr-un viitor apropiat sa rezolve aceasta problema... noi o astepam de cateva luni bune..

Soptareanu commented 2 years ago

I noticed that if no locker is selected, the client does not receive any error and can place the order.

We just made a fix for this issue. Please try to upgrade.

bluegifts commented 2 years ago

not working when one page checkout used