Magento rewards cart does not return the total points to be spent - session-cookies

I have integrated the Magento rewards program to be the main currency insted of money. Users have to earn points and spend them as the methhod of payment for all products.
Currently I am experiencing an issue where the User tries to add items to the cart, it allows to add items over the value which could be spent.
ex :
Current points = 20000
Cart value = 22000
But when I go to back end and save the product again it works fine and trows the message "Not enough points to check out".
Tried all the various things clearing cache, re-indexing, updating product programatically etc. nothing works.

you could try using the controller_action_predispatch_checkout_cart_add event to add a observer which would check if the points available is greater than the points required to buy the product, if it is not you could prevent the product from being added to the cart and show an error message to the user.
If it is possible to add your code to the question I would be able to provide a better solution to your problem.

Related

I want to Understand - URL Parameter Showing me different prices

Please help me understand how this is happening:
I am monitoring one of my competitor's website products. But something strange happened and I am bit confused how this is possible.
Please see the urls below which leads to same product but showing me different prices.
https://www.werko.com.au/product/genuine-fuji-xerox-cwaa0751-waste-toner-bottle/
Price - $33.00
https://www.werko.com.au/product/genuine-fuji-xerox-cwaa0751-waste-toner-bottle/?gclid=EAIaIQobChMI5unSyImD3wIVRBSPCh2y3QNcEAsYASABEgJBpvD_BwE
Price - $31.57
If "?gclid=EAIaIQobChMI5unSyImD3wIVRBSPCh2y3QNcEAsYAS ABEgJBpvD_BwE" portion is of URL is added to any product URL it will show me the edited prices otherwise the old prices. How this is happening?
It's just a GET parameter (Query string) and the webpage is generated (on the server by the script) depending on it. The value itself (part after =) is just a random string here.
Edit: actually it's the Google Click ID which they also use to change the price. So if the Click ID is present, the price is lowered.

spree ecommerce set minimum order amount for cart

We want to define a minimum order value. If line items total less than $500, it will show up error message when customer click on "checkout" button. Can we be able to find this setting under config for admin account?
Looks like spree doesn't have the minimum order value as configurable. You need to add some custom code to achieve this. Check this gist for an example of custom code.

InvoiceAddGroup QuickBooks SDK Incorrect Price

I wrote a program that downloads orders from a website and creates invoices using the SDK.
A few products are listed as Groups in QuickBooks, so when adding them to the invoice, I can't list the price.
If IList.Item(x).Type = 2 Then
Dim ORInvoiceLineAddListElement2 As IORInvoiceLineAdd
ORInvoiceLineAddListElement2 = newInvoice.ORInvoiceLineAddList.Append()
ORInvoiceLineAddListElement2.InvoiceLineGroupAdd.ItemGroupRef.FullName.SetValue(IList.Item(x).FullName)
ORInvoiceLineAddListElement2.InvoiceLineGroupAdd.Quantity.SetValue(IList.Item(x).Quantity)
'ORInvoiceLineAddListElement2.InvoiceLineGroupAdd.Desc.SetValue(IList.Item(x).DESC)
End If
This will input into QuickBooks just fine, however, the price will be based on a retail customer, even if the customer class is set to wholesale. I know that the customer class is correct because everything else shows up correctly in the generated invoice.
Any suggestions on what i could try to get this group item priced correctly?
Thanks for your help!!!
QuickBooks Class codes have nothing at all to do with pricing. They have no effect what-so-ever on pricing in any form or manner.
What makes you think setting the Class should change pricing in any way?
I was having the same issue. what is happening is the Group line items are being assigned the Default Price from the Items table. shouldn't have anything to do with the Class. I did find the following support answer which seems to apply to both Desktop and Online versions of QuickBooks:
"The SDK does not currently support adjusting the price of group items when adding an invoice, even though the default UI in QuickBooks allows this. You can modify an invoice and change the line item amounts, so you would need to first call create the add, read the response to get the transaction id and edit sequence, then do an Invoice Mod request on the invoice to set the rates that you want."
Intuit Developer Page

QBSDK linking invoice to estimate

I am using the QBSDK QBFC12Lib in C#.Net with Reckon Accounts 2013 (Quickbooks Australia/NZ version). It is a test version but has been activated.
I have the basics working. I can add a customer, job, estimate and invoice and run queries against them.
But I can't link an invoice to an estimate (to keep track of progress invoicing). If I try to add the estimate TxnID as a LinkToTxnID, when I submit the request I get the error message 3210 - Object "25-1376628895" specified in the request cannot be found.
I have verified that EstimateID is providing the correct TxnID for the estimate (25-1376628895). It was selected by querying the estimate anyway and if I add an invoice to the estimate manually using Quickbooks itself and then query that invoice using the SDK it gives me the same TxnID under linked transactions.
These are the relevant lines of code:
IInvoiceAdd invoiceAdd = requestMsgSet.AppendInvoiceAddRq();
invoiceAdd.LinkToTxnIDList.Add(EstimateID);
Is it possible to link an invoice to an estimate using the SDK? And if so, am I doing something wrong?
It doesn't appear that this is supported in the SDK. The programmer's guide only gives information on how to link an invoice to a sales order. Since the LinkToTxnIDList does not give an option for what type of transaction type it is, I would guess that it is only looking for SalesOrders when supplying the ID. I also tested linking by specifying the individual line item ID and still get the same error.
Perhaps as a workaround, you could create a SalesOrder from the Estimate (assuming that you can link them), and then create an invoice from the SalesOrder.

Amazon add-to-cart url parameters

Ok so Im already an affiliate of amazon. I'm dynamically generating links based on results from their API. Im trying to put the customer in front of a permission to add an item to their cart. I have this structure as an example:
http://www.amazon.com/gp/aws/cart/add.html?AssociateTag=your-tag-here-20&ASIN.1=B003IXYJYO&Quantity.1=2&ASIN.2=B0002KR8J4&Quantity.2=1&ASIN.3=B0002ZP18E&Quantity.3=1&ASIN.4=B0002ZP3ZA&Quantity.4=2&ASIN.5=B004J2JG6O&Quantity.5=1
This works great as long as Im selling amazon-only products. What Im trying to do is put them in front of the lowest price for that product (items that are being sold on amazon by other people/dealers).
I already have the lowest prices etc etc. The problem is structuring the link to get them there. Do any of you know the parameters in the url that I would add or at least a list of parameters I could sift through to find what Im looking for?
Also, if theres a way to just put the item in their cart as apposed to taking them to a permission to add to cart...that would be that much better!
Thanks in advance!
Please refer to the documentation for forming an associate URL:
https://webservices.amazon.com/paapi5/documentation/add-to-cart-form.html
The "Add to Cart" form enables you to add any number of items to a customer's shopping cart and send the customer to the Amazon retail website for completing the purchase. Some parameters are optional, but you must specify quantity and at least one of the following parameters: ASIN or OfferListingId. AssociateTag is a must for attribution. You can either use this Online Amazon Add To Cart Link Generator To Easily Generate Add To Cart Link Without writing attributes by yourself or you can do this manually just like this:
"ASIN.1=[ASIN]&Quantity.1=1&ASIN.2=[Another ASIN]&Quantity.2=10"
Your final Link May Look Like This:
https://www.amazon.in/gp/aws/cart/add.html?AWSAccessKeyId=leNM%2FocHLQ%2ByqCuwtsgoza8buGoeRSlHuoDGRnlb&AssociateTag=ajaykumar9207-21&ASIN.1=B07CQ6Q52H&Quantity.1=1&ASIN.2=B07CQ6Q52H&Quantity.2=1&ASIN.3=B07CQ6Q52H&Quantity.3=1&ASIN.4=B07CQ6Q52H&Quantity.4=1&ASIN.5=B07CQ6Q52H&Quantity.5=1

Resources