Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 07:45
    yecli assigned #1512
  • Jan 30 2019 13:52
  • Jan 30 2019 09:55
    tatarincev commented #940
  • Jan 30 2019 09:54
    tatarincev reopened #940
  • Jan 30 2019 09:36
    anivirtoway closed #940
  • Jan 30 2019 09:36
    anivirtoway commented #940
  • Jan 29 2019 13:10
    anivirtoway opened #1516
  • Jan 29 2019 12:39
  • Jan 29 2019 11:50
    yecli commented #1514
  • Jan 29 2019 11:50
    yecli closed #1514
  • Jan 29 2019 11:36
    vulcangz starred VirtoCommerce/vc-platform
  • Jan 29 2019 11:03
    anivirtoway assigned #940
  • Jan 29 2019 10:56
    anivirtoway unassigned #1180
  • Jan 29 2019 10:56
    anivirtoway assigned #1180
  • Jan 29 2019 07:42
  • Jan 29 2019 07:11
    yecli closed #1515
  • Jan 29 2019 07:11
    yecli commented #1515
  • Jan 29 2019 07:07
    yecli milestoned #1515
  • Jan 29 2019 07:07
    yecli opened #1515
Tatarincev Eugeney
@tatarincev
Did you call these API from storefront or directly?
Wim Vergouwe
@WimVergouwe
Directly, in a test project with the re-use of the storefront authentication handlers
Tatarincev Eugeney
@tatarincev
hm, in order to consume platform API you need to obtain JWT (Bearer) token first.
image.png
In order to do this manually you can use Swagger UI
Wim Vergouwe
@WimVergouwe
Yeah, sure, I can do all other actions with a cart, but I cannot call PUT for the car
Tatarincev Eugeney
@tatarincev
hm
system responds with 401?
Wim Vergouwe
@WimVergouwe
403 forbidden
How can I send you my log file?
Tatarincev Eugeney
@tatarincev
I'm just relizing that you update an entire cart and this API method is required permission
Wim Vergouwe
@WimVergouwe
Tatarincev Eugeney
@tatarincev
We are going to add this permission for demoadmin
Wim Vergouwe
@WimVergouwe
Thank you!
Tatarincev Eugeney
@tatarincev
done
please check
Wim Vergouwe
@WimVergouwe
Cool, works!
One more question, is there any reason why GetCartItemsCountAsync always returns 0?
Tatarincev Eugeney
@tatarincev
Where did you find this method?
Wim Vergouwe
@WimVergouwe
In CartModuleApi
Tatarincev Eugeney
@tatarincev
Hm, it should returns the Cart.Items.Count() for cart with the passed id
seems your cart is always empty somehow
Wim Vergouwe
@WimVergouwe
Not really, when I immediately get the cart after getting the count ,there is a lineitem with quantity 1 in it
Looking at the implementation of GetCart and GetCartItemsCount, I see that they're not using the same pattern to access the cart, could that be a potential issue?
Tatarincev Eugeney
@tatarincev
Indeed
there is Default response group that doesn't allow to load cart items from DB
Wim Vergouwe
@WimVergouwe
That seems to make sense ;)
It probably would be better to have this method on the repository so that SQL could do the aggregation, right?
Tatarincev Eugeney
@tatarincev
Yes for performance reasones,
Wim Vergouwe
@WimVergouwe
There's a cache in place, that one could also be used?
Might be much simpler...
Tatarincev Eugeney
@tatarincev
But I'm strongly recommend to use GraphQL endpoints instead of REST API for these use cases
like a catalog browsing, and work with shopping cart, there is out-te box many very useful features such as prices, discounts, availability evaluations, cart validations and etc
Wim Vergouwe
@WimVergouwe
I agree, but that would be part of second iteration for me.
How mature is it? Are you running it in production somewhere?
Tatarincev Eugeney
@tatarincev
it hasn't worked on any production yet but on going for some projects
HashtagPush
@HashtagPush_twitter
@tatarincev is it possible to add free product x to the shopping cart automatically when using a coupon code?
Tatarincev Eugeney
@tatarincev
image.png
Hi, it is required to write some code on the storefront, you can use the special marketing promotions 'gifts' to declare what a product you want to add to the cart
but also you have to implement the logic for this gift application
because the current storefront version doesn't provide such logic out-the-box
HashtagPush
@HashtagPush_twitter
ok, thank you
does Virto support 'tiered pricing' for promotions?
@tatarincev
HashtagPush
@HashtagPush_twitter

For example,

The first 1-20 units would cost, say, $10 each. The next 21-30 units would cost $8.50 each, and the next 31-40 units would cost $7 each.

Tatarincev Eugeney
@tatarincev
Yes, virto support tier prices out-th-box
HashtagPush
@HashtagPush_twitter
@tatarincev how can I setup it?