How on installation step I can get store url? Because store hash is not the thing I really need I guess, as then I can't access is somehow by link.
if you are using the bigcommerce api, you can get the store information: https://developer.bigcommerce.com/api/stores/v2/store_information according the documentation
the api response give you:
stdClass Object
(
[id] => [your-store-identifier]
[domain] => [youstore-domain-name].mybigcommerce.com
[name] => test
[address] =>
[phone] =>
[admin_email] => test#domain.com
[order_email] => test#domain.com
[language] => en
[currency] => USD
[currency_symbol] => $
[decimal_separator] => .
[thousands_separator] => ,
[decimal_places] => 2
[currency_symbol_location] => left
[weight_units] => LBS
[dimension_units] => Inches
[dimension_decimal_places] => 2
[dimension_decimal_token] => .
[dimension_thousands_token] => ,
[plan_name] => Professional Application Developer Store
[logo] => Array
(
)
[is_price_entered_with_tax] =>
[active_comparison_modules] => Array
(
)
)
i have created distribution id.It has following property
Array (
[id] => E3VYXDXV1O9WXQ
[status] => Deployed
[time] => 1365430752
[domain] => d1fhielx2etku.cloudfront.net
[enabled] => 1
[origin] => avijit_bucket.s3.amazonaws.com
[originAccessIdentity] =>
[defaultRootObject] =>
[cnames] => Array
(
[mycustomvideo1.com] => mycustomvideo1.com
)
[trustedSigners] => Array
(
)
[comment] => New distribution created )
What will be next step.How do i access video
I have working on SANDBOX. I am getting error :
[0] => Array
(
[L_ERRORCODE] => 11502
[L_SHORTMESSAGE] => Invalid Token
[L_LONGMESSAGE] => The token is invalid
[L_SEVERITYCODE] => Error
)
This is what i passing in CreateRecurringProfile :
[REQUESTDATA] => Array
(
[USER] => "API_USER"
[PWD] => "API_PASS"
[VERSION] => 74.0
[BUTTONSOURCE] => AngellEYE_PHPClass
[SIGNATURE] => "API_SING"
[METHOD] => CreateRecurringPaymentsProfile
[TOKEN] => EC-8F723718H3002730R
[SUBSCRIBERNAME] => Tester Testerson
[PROFILESTARTDATE] => 2012-09-06T00:00:00\Z
[DESC] => Item 1 Name
[AUTOBILLAMT] => 1
[BILLINGPERIOD] => Month
[BILLINGFREQUENCY] => 1
[TOTALBILLINGCYCLES] => 0
[AMT] => 10.00
[CURRENCYCODE] => USD
[EMAIL] => hide#address.com
[BUSINESS] => Testers, LLC
[FIRSTNAME] => Tester
[LASTNAME] => Testerson
)
NOTE: I have removed SANDBOX API Credential. To show here.
Please give me solution what is missing here or what is fault in my posting request.
Thanks for advance
Did you include L_BILLINGTYPE0=RecurringPayments in your SetExpressCheckout and DoExpressCheckoutPayment API calls?
I'm setting up Paypal on a site at the moment as an alternative payment method for customers. In general, it's working fine; I can put an order through and it goes through to Paypal's site, shows the correct information, and all is fine. When a user applies a discount to the order, things still work fine, no worries at all.
When a user applies a discount for the full order value (ie. order is for £20, they have a discount code for £20 off) I'm getting the error "Item total is invalid." back from Paypal. The cost being sent across is £0, and the shipping being sent across is £5.
First off, is there anything wrong with the fields I'm sending across, and if so, what's wrong? :) If you need any more info, feel free to ask.
Sample express checkout fields:
Array
(
[METHOD] => SetExpressCheckout
[RETURNURL] => /snip/
[CANCELURL] => /snip/
[NOTIFYURL] =>
[AMT] => 5.00
[DESC] =>
[CURRENCYCODE] => GBP
[MAXAMT] =>
[USERACTION] => commit
[INVNUM] =>
[ADDROVERRIDE] => 0
[SHIPTONAME] =>
[SHIPTOSTREET] =>
[SHIPTOSTREET2] =>
[SHIPTOCITY] =>
[SHIPTOSTATE] =>
[SHIPTOZIP] =>
[SHIPTOCOUNTRYCODE] =>
[LOCALECODE] => GB
[PAGESTYLE] =>
[HDRIMG] =>
[BUTTONSOURCE] => /snip/
[L_SHIPPINGOPTIONISDEFAULT0] => true
[L_SHIPPINGOPTIONNAME0] => Royal Mail Tracked Next Day Ref:/snip (int)/
[L_SHIPPINGOPTIONLABEL0] =>
[L_SHIPPINGOPTIONAMOUNT0] => 5.00
[L_SHIPPINGOPTIONISDEFAULT1] => false
[L_SHIPPINGOPTIONNAME1] => Interlink Express Next Day Delivery (Ord Ref:/snip (int)/
[L_SHIPPINGOPTIONLABEL1] =>
[L_SHIPPINGOPTIONAMOUNT1] => 7.00
[L_SHIPPINGOPTIONISDEFAULT2] => false
[L_SHIPPINGOPTIONNAME2] => Collect In Store Ref:/snip (int)/
[L_SHIPPINGOPTIONLABEL2] =>
[L_SHIPPINGOPTIONAMOUNT2] => 0.00
[L_NAME0] => /snip/
[L_NUMBER0] => /snip (item id)/
[L_DESC0] =>
[L_AMT0] => 8.33
[L_TAXAMT0] => 1.67
[L_QTY0] => 1
[L_NAME1] => /snip/
[L_NUMBER1] => /snip (item id)/
[L_DESC1] =>
[L_AMT1] => 8.33
[L_TAXAMT1] => 1.67
[L_QTY1] => 1
[L_AMT2] => -16.66
[L_TAXAMT2] => -3.34
[L_NAME2] => /snip/
[L_DESC2] => /snip/
[L_QTY2] => 1
[ALLOWNOTE] => 1
[BUYEREMAILOPTINENABLE] => 1
[CALLBACK] => /snip/
[CALLBACKURL] => /snip/
[CALLBACKTIMEOUT] => 6
[REQCONFIRMSHIPPING] => 0
[SHIPPINGAMT] => 5.00
[ITEMAMT] => 0.00
[TAXAMT] => 0.00
)
You can't send an empty or zero amount to PayPal. $0.01 is the lowest you can go.
You can try and work around this by taking a cent from the shipping and adding it to the total or swap the shipping and item charges if the item charge is zero.
Posts and comments are stored in the same table. So to get each post and its comments we do this:
$posts = $this->select()->setIntegrityCheck(false)
->from(array('post' => 'Posts'), array('*'))
->where('post.idGroup = ' . $idGroup)
->where('post.idTopic IS NULL')
->order('post.date DESC')
->limit($resultsPerPage, $resultsPerPage * ($page - 1))
->joinLeft(array('user' => 'Users'), 'post.idUser = user.idUser',
array('idUser', 'fname', 'lname', 'profileUrl', 'photoUrl'))
->joinLeft(array('comment' => 'Posts'), 'comment.idTopic = post.idPost')
->query()->fetchAll();
The problem is that the resulting array is flat and the comment data overwrites the post data, this is an example of what is returned:
[1] => Array
(
[idPost] => 13
[idTopic] => 11
[idGroup] => 1
[idUser] => 84
[postContent] => Hello my name is Mud.
[postUrl] => 13/hello-my-name-is-mud
[postVotes] =>
[postScore] =>
[date] => 2009-07-21 16:39:09
[fname] => John
[lname] => Doe
[profileUrl] => john-doe
[photoUrl] => uploads/userprofiles/0/84/pic84_14
)
What we would like the result to be is something more like this:
[1] => array(
[post] => array(
[0] => array(
idPost => 12,
postContent => This is a post...,
idGroup => 1
...
)
),
[user] => array(
[0] => array(
userName => JohnDoe
...
)
),
[comments] => array(
[0] => array(
idPost => 15,
postContent => This is a comment...,
idGroup => 1
...
),
[1] => array(
idPost => 17,
postContent => This is another comment...,
idGroup => 1
...
)
)
)
Any hints to other solutions is also very welcome.
Thanks.
If you alias all the columns in the second join to posts (like idPost as child_idPost... etc), you'll get many rows that are the parent row with the columns of the second row. Thats about the closest you'll get. You can then grab the parent data from the first row, and then loop through the subsequent rows to get your one-to-many data.
Otherwise, just do two queries, one for the parent, one for the children. It may be faster than creating that large result table anyway.
Zend does not make your preferred form easy, but it might be possible. Note, however, that you are asking the database server to do far more work than you actually want, because the post and user information are duplicated for each comment. Justin is correct that a second query is easier and probably faster. However, I can provide some pointers toward a solution.
To start, consider what you would get by using the Zend_Db::FETCH_NUM fetch mode:
Array(
[0] => Array(
[0] => 12
[1] =>
[2] => 1
[3] => 84
[4] => This is a post...,
[5] => 12/this-is-a-post
[6] =>
[7] =>
[8] => 2009-07-21 16:39:09
[9] => 84
[10] => John
[11] => Doe
[12] => john-doe
[13] => uploads/userprofiles/0/84/pic84_14
[14] => 15
[15] => 12
[16] => 1
[17] => 79
[18] => This is a comment...,
[19] =>
[20] =>
[21] =>
[22] => 2009-07-21 17:40:10
),
[1] => Array(
[0] => 12
[1] =>
[2] => 1
[3] => 84
[4] => This is a post...,
[5] => 12/this-is-a-post
[6] =>
[7] =>
[8] => 2009-07-21 16:39:09
[9] => 84
[10] => John
[11] => Doe
[12] => john-doe
[13] => uploads/userprofiles/0/84/pic84_14
[14] => 17
[15] => 12
[16] => 1
[17] => 127
[18] => This is another comment...,
[19] =>
[20] =>
[21] =>
[22] => 2009-07-20 10:31:26
)
)
Then somehow you have to come up with the mapping of column numbers to table and column names:
Array(
[0] => post.idPost
[1] => post.idTopic
[2] => post.idGroup
[3] => post.idUser
[4] => post.postContent
[5] => post.postUrl
[6] => post.postVotes
[7] => post.postScore
[8] => post.date
[9] => user.idUser
[10] => user.fname
[11] => user.lname
[12] => user.profileUrl
[13] => user.photoUrl
[14] => comment.idPost
[15] => comment.idTopic
[16] => comment.idGroup
[17] => comment.idUser
[18] => comment.postContent
[19] => comment.postUrl
[20] => comment.postVotes
[21] => comment.postScore
[22] => comment.date
)
This is the part where it gets tricky, because the table part of that is strongly specific to the database interface, and not always possible. Because it is tied to the result set, the adapter will also be the best place to obtain it; that means hacking Zend classes, possibly by providing your own adapter class. Depending on your database, the information might come from:
PDO: PDOStatement->getColumnMeta
Mysqli: mysqli_fetch_field_direct
Other adapters might not have a way to obtain the table name, unfortunately.
Yeah we've had the same issue, just finished blogging about it: http://www.kintek.com.au/blog/zend-db-and-joins/
You need to name each field uniquely, it's a known bug in Zend: http://framework.zend.com/issues/browse/ZF-6421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel