I'm using Express Checkout in Paypal and trying to pass discount as a separate item (according to manual this is supported).
I pass the following part (full discount on the item, but require to pay shipping):
&NOSHIPPING=0
&PAYMENTREQUEST_0_SHIPPINGAMT=2.00
&PAYMENTREQUEST_0_SHIPDISCAMT=0.00
&L_PAYMENTREQUEST_0_NAME0=Item1
&L_PAYMENTREQUEST_0_QTY0=1
&L_PAYMENTREQUEST_0_AMT0=25.90
&L_PAYMENTREQUEST_0_NAME1=Discount
&L_PAYMENTREQUEST_0_QTY1=1
&L_PAYMENTREQUEST_0_AMT1=-25.90
&PAYMENTREQUEST_0_ITEMAMT=0.00
&PAYMENTREQUEST_0_AMT=2.00
But I get "The totals of the cart item amounts do not match order amounts."
I checked many cases and it seems that all other issues people had are already addressed in my example, but it still doesn't work.
Any hints?
Thanks!
As far as I know the "ITEMAMT" should not be zero . It must be greater than zero . So , if you use like this, it should work :
&NOSHIPPING=0
&PAYMENTREQUEST_0_SHIPPINGAMT=2.00
&PAYMENTREQUEST_0_SHIPDISCAMT=0.00
&L_PAYMENTREQUEST_0_NAME0=Item1
&L_PAYMENTREQUEST_0_QTY0=1
&L_PAYMENTREQUEST_0_AMT0=25.91
&L_PAYMENTREQUEST_0_NAME1=Discount
&L_PAYMENTREQUEST_0_QTY1=1
&L_PAYMENTREQUEST_0_AMT1=-25.90
&PAYMENTREQUEST_0_ITEMAMT=0.01
&PAYMENTREQUEST_0_AMT=2.01
I received an answer from official support of Paypal:
PAYMENTREQUEST_0_ITEMAMT - cannot be zero.
Two options:
Either reduce discount in main items section by 0.01 making the total value of goods ITEMAMT 0.01 and then additionally make a shipping discount of 0.01 (balancing the final sum).
PAYMENTREQUEST_0_PAYMENTACTION=Sale
<!-- Item 1-->
L_PAYMENTREQUEST_0_NAME0=Item1
L_PAYMENTREQUEST_0_QTY0=1
L_PAYMENTREQUEST_0_AMT0=25.90
<!-- Iteam 2-->
L_PAYMENTREQUEST_0_NAME1=Discount
L_PAYMENTREQUEST_0_QTY1=1
L_PAYMENTREQUEST_0_AMT1=-25.89
<!--Total of items amount-->
PAYMENTREQUEST_0_ITEMAMT=0.01
<!-- Shipping/tax/handling etc-->
PAYMENTREQUEST_0_SHIPPINGAMT=2.00
PAYMENTREQUEST_0_SHIPDISCAMT= -0.01
<!-- Total amount -->
PAYMENTREQUEST_0_AMT=2.00
Another option is to move shipping costs into items section:
L_PAYMENTREQUEST_0_NAME0=Item1
L_PAYMENTREQUEST_0_QTY0=1
L_PAYMENTREQUEST_0_AMT0=0.00
<!-- Iteam 2-->
L_PAYMENTREQUEST_0_NAME1=shipping cost
L_PAYMENTREQUEST_0_QTY1=1
L_PAYMENTREQUEST_0_AMT1=2.00
<!--Total of items amount-->
PAYMENTREQUEST_0_ITEMAMT=2.00
PAYMENTREQUEST_0_AMT=2.00
For my question - why don't they implement it properly, I've got no response.
So we are left to use one of this crazy workarounds ((
Related
Pricerunner have their prices in SERP, so I wanted to do this as well. But for some reason, I don't get any prices in my results.
When I test with Google's structured data tool, I get:
But on my page I get:
Apparently, the only difference (besides review), is the #ids.
If I follow Pricerunners ID then it's an actice link, but if I follow mine IDs, they result in a 404. Problem is, that I haven't set up any IDs?
If you take the first ID on my page, it's: /lelo-lyla-2/product-2348
ID is set to product-2348, wich is standard WooCommerce, but it's being added to the URL, so the URL is /lelo-lyla-2/product-2348 witch results in a 404.
Same with the last ID in aggregated offer: /lelo-lyla-2/price-list
Where does /price-list come from? The div? Should I remove the id="price-list" from the div, in order to make it work, or?
<div id="price-list" itemtype="http://schema.org/AggregateOffer" itemscope itemprop="offers">
<meta content="675" itemprop="lowPrice">
<meta content="1039" itemprop="highPrice">
<meta content="7" itemprop="offerCount">
<meta content="DKK" itemprop="priceCurrency">
</div>
When I run the page through Google's test tool, it gets 0 errors. But I suspect it's because of the "invalid" IDs, or?
I think it’s a bug in Google’s SDTT that it takes the value of the id attribute and uses it as identifier for the item. That’s the job of the itemid attribute in Microdata. I would suggest to ignore the extracted #ids that result from this; only care about those coming from itemid.
For Google’s Product rich result (with aggregate offer) it doesn’t state that an identifier would be required to begin with. So the problem that you don’t get the rich result has most likely nothing to do with this.
As per Google's Product-specific usage guidelines, "Adult-related products are not supported."
On the graph we can see the main items like "Cash and Liquid Assets", "Loan Portfolio", "Securities" and etc. Each of the main items has sub-items, showing what the item consist of. It looks like :
Cash and Liquid Assets (Item )
Cash (subitem)
Precious Metals (subitem)
Nostro accounts (subitem)
Loan Portfolio (item)
Individual (subitem)
SME (subitem)
Micro (subitem)
Securities (item)
Securities (subitem)
Could you please advice, if the Item contains only one sub-item (as in 3.Securities), not to show sub-item in the graph as they indicate the same amount. I am able to blanc the sub-item , but not to remove the row. This, in turn, make the graph look weird. If it is not possible to remove the sub-item row, please advice how to minimize the row's height .
EDIT: this does not apply, i did not understand it was about a crosstab. I did not delete the answer to preserve the comments below.
I supose you have a group with details. So, "3. Securities" shows up in group header and "Securities" shows up in detail section.
If so, then, you may put a formula to hide the detail section.
Create a summary field to count the details per group.
Right click the details section and choose "section expert".
Find the "Suppress (no drill-down)" check box on the right pane.
Click its formula button.
If the counter is 1, return true, else return false.
I am building a Booking model in Rails 3.2.3 where a user steps through several form-screens of choices. If the form exactly mirrored the underlying model I know I could use a gem (e.g. Wicked gem) to build a multi-step form. The issue I am having is that on one of the form-screens there are multiple options for the user and within each of those options there are multiple options coming from an external web-service. In other words, on step 2 of the multi-step process, the form presents the user with many options of Rates from our database and for each Rate we have multiple additional options from the web-service. So a user would need to choose one of the options from the web-service (radio buttons) and then make a selection of their Rate of choice. This is then repeated multiple times on this page (although the user can only choose one radio-button option from the web-service and one Rate).
Where I am unsure of best practice is that I can display the multiple options from the web-service as radio buttons but there is a Hash of values associated with each of those options and hence with each of those radio buttons.
So, the question is, should I be attempting to pass that Hash as a param to the next step of the form process or should I be making that into an object and passing that or something else entirely!
I know this is a long explanation but I feel it's a critical point in the design of this workflow and I want to get it right.
Many thanks in advance,
J.
EDIT
Thinking it through again, the initial problem is how to represent a series of radio buttons when each radio button represents many values as opposed to say an id (in this instance each radio button represents a hash of values from the external web-service). Should the hash be made into an object and this passed instead - something along those lines?
I figured this out. On inspecting the "hash" coming back from the external web-service, I noticed that date fields were not in quotes, e.g.
:departs=>Wed, 21 Aug 2013 10:40:00 +0000
whereas all the other fields were in quotes. This made me a little suspicious. So in the end I used to_json on the returned hash:
response_hash_from_webservice = data.to_json
In the form I then used:
JSON.parse(response_hash_from_webservice).each do |nested_item|
# Access elements like so
... nested_item['company_name'] etc ...
end
However I needed to post this nested_item through to a next step of the form (as a radio button) and it only worked by again using to_json.
<%= radio_button_tag 'nested_item', nested_item.to_json %>
I could then post this value or put it in the session and on the following form page use:
require 'json'
hash = JSON.parse session[:nested_item]
And then access the values as normal:
<%= nested_item['company_name'] %>
Im currently developing an e-commerce site for a cellular network in ATG. I'm trying to apply "filters" to restrict phones according to their display sizes with three categories namely
4 -inches and less
4 - 5 inches
5 - inches and more.
Currently I am able to pass only one value like 4 inches and get all phones in the 4 inch category.
--------code---------
<LI id=menu-item-458
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-458">
<dsp:droplet name="/store/commerce/droplets/FilterDroplet" >
<dsp:param name="filterBy" value="displayScreenDetails"/>
<dsp:param name="filterConstant" value="4"/>
<dsp:oparam name="output">
<p id="4" class="selected">
* 4-inches(<dsp:valueof param="count"/>)</p>`
</dsp:oparam>
</dsp:droplet>
</LI>
Its an <LI> for showing the menu with passing values to a script function called filerItems()
I wanna show all phones under their respective categories and not definitive numbers. Help me form the code with dsp tag libraries or a java method to handle the passed value.
I hope my question is clear.
Thank you.!
You will need to add another request parameter to your FilterDroplet that will take an operator (like 'equals' or 'lessThan') and then, inside the service method call a new method that takes 3 parameters. Assuming that you currently have a small method that will take 2 parameters (for 'filterBy' and 'filterConstant').
Your output also seems a bit restricted, since it assumes you will only get 1 result. There is no loop running over the output param.
There are easy ways and long ways to do this. But I would recommend the long way which will help in a long run. Since you are working with filters, its important to categorize them with the SKU property. Hoping that screen size comes from BCC (meaning DB), try to create a field for your SKU object to compute the category during the initialization.
SKU will already have your screen size property and it shouldn't be hard enough to create a field for filter in your non-repository SKU object. While page is loading, pass all the SKUs displayed on page and get the filter details, so that it will be helpful later if another filter item is added.
I feel it needs a more generic approach by creating a custom Filter map, which can be used for populating any property.
Let's say I have I have an online store with a "shopping cart" feature and I want to implement an "empty cart" link in a RESTful way.
For simplicity, let's say my resources are a Cart that contains CartItems, each of which has a Product. My URIs might be:
# add a product to the current user's Cart
POST /products/product_id/cart_items/
# remove a product from the current user's Cart
DELETE /cart_items/cart_item_id/
If so, what would the RESTful URI for the "empty cart" link look like?
Instead, I could think of the Cart as a general-purpose holder for Actions (as described here):
# add a product
# form data contains e.g., product_id=123&action=add
POST /carts/cart_id/actions/
# remove a product
# action_id is the id of the action adding product 123
DELETE actions/action_id
# empty cart
# form data contains action=clear
POST /carts/cart_id/actions/
This approach seems more complicated than it needs to be. What would be a better way?
Don't do the second approach. Funneling different actions through one endpoint does not feel RESTful IMO.
You have DELETE /cart_items/cart_item_id/ that removes cart_item_id from their cart. What about DELETE /cart_items/ to clear the cart itself?
Adding an item to a cart:
POST carts/{cartid}/items
Retrieving a specific item from the cart:
GET carts/{cartid}/items/{itemid}
Deleting a specific item from the cart:
DELETE carts/{cartid}/items/{itemid}
Getting the state of the cart:
GET carts/{cartid}/state
(Could return a value like 0,1 that indicates the number of items in the cart)
Emptying the cart:
PUT carts/{cartid}/state?state=0
Does this look intuitive?
DELETE /cart_items/ is an interesting idea that has also been discussed here.