Order Entry Software for Sales Reps

1 week ago
I figured out how to fix my issue.

  var minimumCustomerEnteredPrice = _currencyService.ConvertFromPrimaryStoreCurrency(product.MinimumCustomerEnteredPrice, _workContext.WorkingCurrency);
            var maximumCustomerEnteredPrice = _currencyService.ConvertFromPrimaryStoreCurrency(product.MaximumCustomerEnteredPrice, _workContext.WorkingCurrency);
            var defaultPrice = _currencyService.ConvertFromPrimaryStoreCurrency(product.Price, _workContext.WorkingCurrency);

            model.CustomerEnteredPrice = updatecartitem != null ? updatecartitem.CustomerEnteredPrice : defaultPrice;

Because of af1racing, I am able to solve my issues.  Great thanks to af1racing.  I'd like to buy you lunch. :)  Please email me your paypal id. I'd like to send you a little gift.  My email address is [email protected]
1 week ago
Awesome work!  Thanks for the very kind offer but lunch not required (I'm actually well stocked on groceries, thankfully).  Just pay it forward!
1 week ago
Glad to hear you are well stocked on groceries. I truly appreciate your help and will try to help others like you did.
1 week ago
I have another challenge.  When the product attribute and the option "Customers enter price" are used, the available inventory qty and prices don't display the updated prices accordingly.

I'm taking a look on _ProductPrice.cshtml and _ProductAttributes.cshtml. Not sure if I'm on the right track to fix the issue.

P.S. Is there a way to upload photos (screenshots) from my desktop? It has only http links.
1 week ago
looks like it returns early in PrepareProductAddToCartModel before it gets to min/max CustomerEnteredPrice because it checks against the Product again:



It may happen similarly for Availability or Attributes, so I would just set breakpoints and trace it down step by step through the Factory.
1 week ago
af1racing,

I think it is more related to the View level. It looks like the CustomeredEnteredPrice is not updated when the CustomerEnteredPrice option is true.

I'm still searching for the answer where to edit it.  Also, it is my mistake.  The Available Inventory Qty is working well regardless of the customerenteredprice option.

P.S.  My first account is not working.  The password recovery option in nopcommerce.com is not working.  No password recovery email.  Therefore, I had to create another account.  :(
1 week ago
To af1racing,

After modifying ProductDetails_AttributeChange in ShoppingCartControllers.cs, the Price is now updated.  However, the default price in the CustomerEnteredPrice text box is not updated.  It looks like the Ajax touches only the Price, not the CustomerEnteredPrice text box.

I am still researching for the solution.  :)

Thank you for the advice.
1 week ago
ah, sorry, I misunderstood.  the jquery shouldn't be too hard to update, I'll try to take a look later today
1 week ago
I think the script below in _ProductAttributes.cshtml should be modified but don't know how to control the input text box's input value from the script.  I thought .value instead of .text should be used but it doesn't work.

From page source:  <input value=56 class=enter-price-input.....


From _ProductAttributes.cshtml
<script asp-location="Footer">
            function @(attributeChangeHandlerFuncName)() {
                $.ajax({
                    cache: false,
                    url: "@Html.Raw(Url.Action("productdetails_attributechange", "shoppingcart", new {productId = productId, validateAttributeConditions = attributesHaveConditions, loadPicture = attributesHaveAssociatedPictures }))",
                    data: $('#product-details-form').serialize(),
                    type: "POST",
                    success: function (data, textStatus, jqXHR) {
                      
                        if (data.price) {

                            $('[email protected]').text(data.price);
                            $('xxxxxx').value(data.price);
                        }


Update: Solved        $('enter-price-input').val(data.price);
1 week ago
Solved the issue.  I made mistake  on .value.  It should be .val..  

Thank you for helping me again.  :)