Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 04-28-2020 06:24:57

sqm24
Member
Registered: 01-24-2018
Posts: 24

Redirect after login to original opage

Hi,

I have added a new name space to our set up and got the page displaying  and all is good. The page has data for someone who is logged in to the shopping cart so I also was able to get the login  form showing in the page if they where not logged in. However, when you successfully login it goes to the accounts details page. I would like it to go straight back to the original page they where on.

The code for displaying the login looks like this:

Code:

if ( $this->globals('core_user.id') )
          {
               // logged in so display info here
          }
          else
          {
               return $this->exec_namespace(array('app'       => $this->app,
                                        'namespace' => 'login',
                                        'type'      => 'CGI',
                                        'params'    => $this->params));
          }

I did a bit of digging and tried this

           

Code:

$this->params['redir_ns'] = 'Quotes';
               $this->params['redir_ref'] = 'quotes';

but is not making any difference and I know Iím guessing here.

I had a look at account.php and a long with some topics on this forum it looks like I would need to change something in the login_postauth method, but I only want it to go to that page if it is the original page it was logging in from.

How can I pass something to the login method so its can know to change it and how?

Thanks

Offline

 

#2 04-28-2020 09:05:57

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19558
Website

Re: Redirect after login to original opage

Try this:

Code:

if ( $this->globals('core_user.id') )
          {
               // logged in so display info here
          }
          else
          {

               $this->globals('core.redir_ns','Quotes');
               $this->globals('core.redir_ref','quotes');

               return $this->exec_namespace(array('app'       => $this->globals('core.app'),
                                        'namespace' => 'login',
                                        'type'      => 'CGI',
                                        'params'    => null));
          }

That should do it.  Assuming you have the namespace id='{app}.Quotes' and namespace name='Quotes'.


Nick Hendler

Offline

 

#3 04-28-2020 11:12:05

sqm24
Member
Registered: 01-24-2018
Posts: 24

Re: Redirect after login to original opage

Thank You, thats perfect.

Offline

 

#4 04-29-2020 09:02:13

sqm24
Member
Registered: 01-24-2018
Posts: 24

Re: Redirect after login to original opage

Nick, you can probably work out I am implementing a way for our customers to buy a quote that was made for them over the phone (They are trade people and often get a quote then take it to their customer before returning to us to order it should they got the job). Hence the idea of allowing them to order the quote on line.

We are not using your POS system so I have implemented my own namespace and added a couple of tables to hold the quote data. In this data there is the price, but also the total weight as we will be delivering it by carrier. I could do with being able to adjust the weight so any weight surcharges come into effect when calculating the delivery charge.

I have so far been able to get the ordering (without the weight) using a similar way as in https://forum.kryptronic.com/viewtopic.php?id=33568. Where I have a service product with a variable price.

What I am looking for is being able to pass the weight and use that to calculate the price. Is this possible or should the product offer I am using have an inventory item associated with it to be able to set t a weight?

Last edited by sqm24 (04-29-2020 09:09:20)

Offline

 

#5 04-29-2020 10:34:21

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19558
Website

Re: Redirect after login to original opage

The answer to your question depends on whether or not the item is shipped.  It sounds like it is, so you'll want to tie the offer to an inventory item to ensure it gets shipped.  Tying it to an inventory item also gets a weight for the item stored, so you're good to go.  The major question I have is why didn't you just leave it all alone and implement/activate a quote payment method for customers?  Or purchase on account for select customers.


Nick Hendler

Offline

 

#6 04-30-2020 03:34:11

sqm24
Member
Registered: 01-24-2018
Posts: 24

Re: Redirect after login to original opage

I guess I should have asked the question earlier. Being new to Kryptronic Iím still learning what it can do.

Where can I implement/activate a quote payment?

Offline

 

#7 04-30-2020 06:13:29

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1650

Re: Redirect after login to original opage

There is a quote processing gateway here: Dashboard / Store / Commerce / Processing Gateways

I think what you are trying to do would work better with the POS xmod.
With the POS, you can create an order/invoice for any customer and it will create a quote. Quote is sent to customer via email.

They can then decide if they want to proceed. If they do, you can enable the order and process payment.


- Euorpacart 8

Offline

 

#8 04-30-2020 09:22:06

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19558
Website

Re: Redirect after login to original opage

Or, without the POS, you could enable the quote gateway and set it so it's visible for all orders (not just limited to the Management Interface / POS).  If you do this, all customers would be able to check out getting a quote.

The more I think about this, you don't really need a quote system. 

What you need is a way to accept an order that will be paid at a later day with variable shipping charges and let the customer know the shipping is to be calculated.  I think that's best handled with a custom shipping script that calculates a zero price with a special method name, and activation of the quote gateway, or activation rewording of the choice and text for the contact customer gateway.


Nick Hendler

Offline

 

#9 04-30-2020 09:23:26

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19558
Website

Re: Redirect after login to original opage

Maybe explain what is it you're trying to accomplish and we can offer suggestions.  This is a very flexible system and we have something built in just about everywhere to accommodate just about any need you might have.  With or without minor code changes.  Most stuff can be done by being creative with your setup and not touching code.


Nick Hendler

Offline

 

#10 04-30-2020 11:12:28

sqm24
Member
Registered: 01-24-2018
Posts: 24

Re: Redirect after login to original opage

Thanks for your thoughts,

Our  customers are trade who often come to us over the phone requiring a quote so they can build quote for their customer. Often if the job is big enough we can give them a better price on certain items helping them get the job etc. We usually hold the quote for about a month.

We want to be able to put the quotes on line for them to view. Then if they later get the job they can order the quote online with any special prices and not with the online prices.

Not all we sell are sold online, though we could in theory have them as an inventory item and no product offer for them. I say this because the shopping cart we are replacing is not as flexible as Kryptonicís cart and I had to do a bit of a work around to get it to work.

This is not just tied to a single online user as one company many have more then one contact with their own login, So I have used the custom data in the user record to hold a company reference number. Thatís what the namespace I created to list the quotes does; it get that reference number and looks up the quotes to display them.

The next step would be for them to be able to put the quote into the basket. It does not have to be all the inventory items as individual item in the basket, it could be just (and this is what I was working to do) a single item with a quote reference in the itemís notes field. So we can pick that up locally and pack and send the order.

Obviously with that we would need to have the price to match the quote, and the weight so any weight surcharges could be applied.

I hope that explains what we are trying to achieve.

Offline

 

#11 05-01-2020 08:02:36

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19558
Website

Re: Redirect after login to original opage

Is this a small volume of orders that can be processed by staff?  If so, the Point of Sale XMOD does all of this for you - they can call in and you can generate a quote with special pricing (override item pricing, shipping, add custom surcharges/discounts, etc) and mail it to them.  With their approval you can turn it into an order and process it.  Might be as simple as creatin a dynamic form online that allows the customer to submit a quote request for items x, y and z and then you can take that info and generate the quote in the POS.


Nick Hendler

Offline

 

#12 05-01-2020 08:16:55

sqm24
Member
Registered: 01-24-2018
Posts: 24

Re: Redirect after login to original opage

OK,  Where can I find more info on the Point of Sale like price etc and how do we go about ordering it?

Offline

 

#13 05-04-2020 09:13:49

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19558
Website

Re: Redirect after login to original opage

Submit a ticket here and we'll get you pricing and can add the module to your license:

https://kryptronic.com/Form/TECHTICKET


Nick Hendler

Offline

 

Board footer