A space to discuss online store customization, theme development, and Liquid templating.
Possible? You can on the carts page but what about on the checkout page?
ShopifyAPI::LineItem.new({
# I see no line items id?
}).save
How to change price? Must be able to on checkout page. Cart has no customer info so not useful. Im using Ruby on Rails.
Hi again,
Why would you want to? Isn't the right method actally to change the price on the product, have multiple product prices or operate with some form of rebate on the product itself.
Best regards
Tonny
Life would have been great to know which customer is logged in. I must have the customer info. If I have that...the gates of heaven opens.
Use this 🙂
https://help.shopify.com/api/reference/customer
I dont think that's useful. This gives me the current shop details
ShopifyAPI::Shop.current
I'm looking for something like
ShopifyAPI::Customer.current
I see the issue. What you want is probably not accessible. I approached shopify about this last year, they control the "session" and you have no access. But it looks like you can maybe make a hack as the user object seem to be exposed in Liquid. Just use a Jquery Ajax or som other javascript to send the "info" to your Ruby code and take it from there.
Best
Tonny
Forgot the link:
Thanks, Tip. I'll see what I can come up with.