Jump to content

jt_shop's Content

There have been 12 items by jt_shop (Search limited from 26-Jul 20)


Sort by                Order  

#293272 Force A Shipping Method Based On Ip Address At Checkout

Posted by jt_shop on 15 January 2018 - 06:46 PM in Developers' Corner

You can do either method by using the PHP shipping hooks.  You can either return only one shipping method based on your condition or you can set the "free shipping" flag for the items in the order.  It is custom development, there are not administrative methods to do so.  I don't believe IP address is a supported condition in promotions.

Could you tell me where to look for? I've been puzzling in checkout.php, but since this is something I do for one site I'm not too familiar with how everything works yet.




#293139 Force A Shipping Method Based On Ip Address At Checkout

Posted by jt_shop on 12 January 2018 - 02:25 PM in Developers' Corner

Hey,

 

We have a physical shop and we track every order through CS Cart. We have a payment method so people can pay in cash - this way they don't have to pay any shipping fees.

 

We're making a change in how we work - customers can get customer cards, which automatically sign them in so their order is linked to their account (previously, we used just 1 account for this).

 

We need a way to force the 'cash' shipping method when we're logged in the physical shop - for that, we have an IP. Only if a order is made from that certain IP address, there should be no shipping fees.

 

My question is basically one of these: how can I force a shipping method at checkout (even if the user cannot technically use it) or how can I set shipping fees at €0 when ordering from a specific IP address?

 

Thanks in advance :)

 




#291284 Redirect To Page After Act On Behalf Of

Posted by jt_shop on 15 December 2017 - 09:44 AM in Developers' Corner

You can change redirect URL in the app/controllers/backend/profiles.php file, find code by "act_as_user" mode

Thank you :) I used return_url instead of redirect URL. Works perfectly now!




#291227 Redirect To Page After Act On Behalf Of

Posted by jt_shop on 14 December 2017 - 02:53 PM in Developers' Corner

Hi,

 

I'm trying to make a system that let's users scan a card in the physical shop so that the orders will be logged in their account. So far so good, but when using act on behalf of it automatically goes back to the homepage. Is there a way that I can redirect it to a specific page using a GET property?

 

Something like this would be very helpful: /?dispatch=profiles.act_as_user&return_url=test.html&user_id=0

 

Thanks in advance :)




#289834 Skip Shipping Step For A User Or Usergroup

Posted by jt_shop on 27 November 2017 - 02:15 PM in Developers' Corner

Hi,

 

We have a physical shop and to make sure everything goes smooth, we let people pay via the site. We have an account solely for that purpose - to handle physical shop purchases.

 

Because of this, the shipping step is not required (because people take it with them immediately). I want to disable the shipping step entirely for an user or user group - because at checkout it's annoying to have to push more buttons than necessary.

 

Can someone point me in the right direction as to what I have to do to fix this? Something that could go in my_changes would be very handy. The user group which I'm talking about is 'kassa'.

 

Thanks in advance!




#288823 Script.pre.php Changes Do Not Come Through

Posted by jt_shop on 16 November 2017 - 04:02 PM in Developers' Corner

Hi,

 

We are running abt_unitheme from Alexbranding and within the template there is the possibility of a fixed menu that scrolls with you. I've found the code, and it exists in /design/themes/abt__unitheme/templates/addons/abt__unitheme/hooks/index/script.pre.php

 

I've added two console.logs to that file to see what's going on so I can fix it (because we aren't really satisfied with it as of yet). But they take no effect. When I delete the file itself, cs-cart crashes. But if I delete its entire contents but keep the file, it magically still runs. I've cleared the cache multiple times, but to no avail.

 

I've also tried to override it in /design/themes/abt__unitheme//templates/addons/my_changes/hooks/index/script.pre.php, /design/themes/responsive/templates/views/index/script.pre.php - none seem to apply the changes to live.

 

What am I missing?

 

Thanks in advance :)

 

 




#287813 Fn_Change_Order Status Not Working Since Upgrade

Posted by jt_shop on 03 November 2017 - 01:40 PM in Developers' Corner

Adding either of those codes to my function doesn't actually do anything... it's as if it's never executed. I forgot a ; and the page didn't load anymore; so it does load func.php in but apparently the function is never called...

 

Putting die(); at the beginning of the function does nothing. So I assume it has something to do with the hook not being called, but then I would have to be looking into the core files... And I'm no expert unfortunately.




#287725 Fn_Change_Order Status Not Working Since Upgrade

Posted by jt_shop on 02 November 2017 - 05:55 PM in Developers' Corner

I have - it's still 22 for cash and 23 for pin.




#287682 Fn_Change_Order Status Not Working Since Upgrade

Posted by jt_shop on 02 November 2017 - 10:02 AM in Developers' Corner

Hi,

 

We use the website to also handle offline payments, such as cash and via PIN. We have a plugin that's supposed to take care of the order status of these orders, because otherwise the status will stay on waiting for payment.

 

This is the function, in the func.php file from the add-on:

function fn_quick_order_form_change_order_status(&$status_to, &$status_from, &$order_info, &$force_notification, &$order_statuses, &$place_order)
{
    $payment_method_ids = array(22,23);    
    if($status_to == "O" && $status_from == "N" && in_array($order_info['payment_id'], $payment_method_ids))
    {
        $status_to = "C"; 
}
}

And it's registered in the init.php file:

fn_register_hooks(
   'change_order_status'
);

Yet nothing happens. I've seen that in 4.6.2 the change_order hook has been changed a bit, but I don't know how to make it working again.

 

Thanks in advance.




#287083 Trouble Finding Dispatch=Checkout.complete Step Layout

Posted by jt_shop on 25 October 2017 - 08:44 PM in Developers' Corner

Thanks, it was a bit of a puzzle, but we found it.




#286834 Trouble Finding Dispatch=Checkout.complete Step Layout

Posted by jt_shop on 23 October 2017 - 04:04 PM in Developers' Corner

I want to change the page of 'order received', because I'm making a custom function which integrates with the local shop. The page I'm talking about is in the attachments.

 

I've found the .tpl files which interact with this. I've found the checkout.complete function, but nothing there indicates where the actual text comes from. I've tried searching all my file contents, but it's quite a tedious task and doesn't get me much further.

 

The CS-Cart version we're running is 4.6.2. Any luck someone can point me in the right direction? :)

 

Thanks in advance




#285240 Skip Shipping In Checkout Automatically

Posted by jt_shop on 30 September 2017 - 12:20 PM in Configuration

We are using a cs-cart addon as a POS solution. We have connected a barcodescanner and use an addon to create a simple ordering page that once it is done, you only need to add to the shopping basket and use the regular checkout procedure. It works fine, but we always need to go through the checkout pages to complete an order. Step 1 and 2 go automatically (name & address) but 3 (shipping) and 4 (payment) always need to be confirmed to complete an order. Would it be possible to always select 1 shipping option and skip the page. So directly go from 'checkout'-button in basket to payment methode and select 'cash' or 'pin' and then complete the order?