Jump to content



Member Since 13 Mar 2011
Offline Last Active Mar 28 2018 10:11 PM

Topics I've Started

Force A Shipping Method Based On Ip Address At Checkout

12 January 2018 - 02:25 PM



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 :)


Redirect To Page After Act On Behalf Of

14 December 2017 - 02:53 PM



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 :)

Skip Shipping Step For A User Or Usergroup

27 November 2017 - 02:15 PM



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!

Script.pre.php Changes Do Not Come Through

16 November 2017 - 04:02 PM



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 :)



Fn_Change_Order Status Not Working Since Upgrade

02 November 2017 - 10:02 AM



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:


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.