Does anyone know if the `proceedToCheckout` functi...
# suitecommerce
t
Does anyone know if the
proceedToCheckout
function allows custom prices to be used? I realise it sounds like a super bad idea but we have pro rate pricing built in which works for card payments but PayPal still shows the original price.
p
How did you achieve that for credit cards?
And can you further explain what “pro rate” requirements are? Perhaps we can brainstorm something because the answer to the proceedToCheclout is no.
c
@TheAntman Did you try with manipulating the prices with scriptable cart. I have tried to manipulate the custom prices using scriptable cart and I can see my custom prices correctly added to the PayPal summary container
t
It was a little while ago we done it but the system is based on memberships and users can purchase higher levels of their membership. They’re charged based on how long is left until their renewal. So if you only have 10 days left then you’d only pay for the remaining 10 days rather than the full yearly amount, then you’ll get an invoice for the full amount come renewal time. If I remember right there was a couple of parts to it. We had a little function that worked out the pro rata price and returned it with the rest of the cart and that was displayed to the user. Then before we created the sales order there was a before submit running which made sure the correct pricing was used. Kinda messy but it worked
I believe we tried with the scriptable cart before but as soon as we enabled it a whole bunch of pre existing scripts basically broke it and made it useless
p
Unfortunately scriptable cart is the way to go on what you just described as vasudevarao said.
now in 19.2 ir should be easier to turn off all other scripts by context.
t
Hmm hopefully I can get it going that way then. Thanks for your help both of you!