Forum Replies Created
-
AuthorPosts
-
David RParticipant
I didn’t experience it on my site. It’s very strange. And, of course, my fix should hypothetically do nothing, right? It doesn’t change the data that’s being passed, so why does it have an effect? It feels arrogant to say this is a weird issue with PHP, so I won’t, but that’s what it looks like. Even still, it doesn’t explain the isolation.
Hypothetically, I could go back into Karen’s site and dump the data from that array which prompted the error. Then I could compare it to my own. Maybe that would reveal something. However, everything looked kosher to me, and I don’t really have time to do that right now.
If it comes up again, let me know. I’ll investigate then.
David RParticipantHi. I eliminated the PHP Warnings for Karen. Seems silly, but this is what I did to resolve it:
For class-wcvendors-pro-reports-controller.php lines 261 and 340 look like this:
if ( is_object( $order->order ) ) {
I added an additional condition to both so that they now look like:
if ( is_object( $order->order ) && is_array( $order->order_items ) ) {
After that, the Warnings are gone.
David RParticipantMost, if not all, of these options are controlled via the WCV admin settings page. There are checkboxes to choose what to hide or show to vendors.
David RParticipantAfter playing around for a while, firing it at
get_header
worked out.According to the author of The SEO Framework plugin, the incompatibility is because “the template system must be called through WordPress’ query, where they listen to query variables and then load the templates (rather than their [WCV’s] internal rewrite system).”
David RParticipantDavid RParticipantAlong these lines, my vendors would like to see the address exported in pieces, so that it can be imported into PayPal’s bulk shipping system, which does let you map columns on upload. So, no specific format change, just exporting the address pieces in separate columns instead of all together with the customer name.
David RParticipantDid anything ever come of this?
December 6, 2016 at 9:34 am in reply to: WC shows order unpaid, Stripe shows payment collected #49501David RParticipantAny clue what happened? how to prevent it?
David RParticipantFYI – I had a similar issue with the OneSocial theme. As it turned out, the theme’s login form was not using a secure cookie. ie. They weren’t setting the secure flag. Consequently, vendors wouldn’t be able to upload photos if they logged in through the theme’s modal login form, but they would have no problems if they logged in at http://www.example.com/my-account/
December 2, 2016 at 8:49 am in reply to: WC shows order unpaid, Stripe shows payment collected #49132David RParticipantThanks, that’s what I thought, @ben, but I wasn’t absolutely certain. I knew there had been talk of possibly having it do more, so I thought I’d mention it.
November 29, 2016 at 11:06 pm in reply to: WC shows order unpaid, Stripe shows payment collected #48891David RParticipantIt looks like there is some relevant info in the Stripe logs. I’ll attach screenshots and mark this as private. I imagine this will help @digitalchild.
November 29, 2016 at 8:29 pm in reply to: WC shows order unpaid, Stripe shows payment collected #48880David RParticipantSO the transaction for the vendor who did NOT receive payment was cancelled? The other three were successful, correct?
Within Stripe’s dashboard, there’s no indication of a fourth vendor at all. Instead, it looks like the transaction went through successfully, but that only three vendors were involved. See image below.
Has that vendor had a successful transaction before? I am asking because perhaps the vendor does not have Stripe correctly connected.
The fourth vendor is Connected to Stripe, but has only ever received orders from customers paying through PayPal.
Out of the products ordered, was the one unpaid product order the ONLY product ordered form that vendor, or did that vendor receive payment for at least one product?
Within this order, this “excluded vendor” only had one item being purchased.
_____
Today, the customer attempted to place a new identical order. This time, WooCommerce shows the same message “Unpaid – timeout…” but Stripe shows nothing at all.November 28, 2016 at 1:35 pm in reply to: WC shows order unpaid, Stripe shows payment collected #48712David RParticipantMay or may not be of any consequence, but I just realized that the one vendor who didn’t receive payment, according to Stripe, is a vendor who has vacation mode on.
David RParticipantThis appears to have fixed it:
add_filter( 'secure_signon_cookie', function( $secure_cookie, $credentials ) { $secure_cookie = is_ssl(); return $secure_cookie; }, 10, 2 );
I’m pretty confident I have everything setup properly so that everything is served over SSL, no mixed content anywhere. This was/is probably a problem with the theme, which provides the modal login form. Thanks.
David RParticipantDo you have a default image set in Social Media > Facebook settings? If not, try setting one and re-check.
David RParticipantThat looks like what I was getting before implementing the code.
Did you just recently install Yoast, or have you had it setup for some time?
David RParticipantYes, but this code is utilizing a function of Yoast SEO. So, this will only work if you are using Yoast SEO (either free or Pro).
Also, since Fb caches scrape info, after implementing this, a particular shop’s url might still show the wrong image. If that happens go to https://developers.facebook.com/tools/debug/og/object/
There, enter the url and click “Fetch new scrape information”. That will resolve the issue for that single url. So, you probably want to have all your vendors do this for themselves instead of you doing it a hundred+ times.
David RParticipantI’m having this issue as well. I received full html output.
David RParticipantThis is what I worked out. Other may find it useful. It does depend on the use of Yoast SEO, but could probably be adapted for other SEO solutions very easily.
// Set Vendors Store Icon as Open Graph image on shop page function my_opengraph_image( $img ) { if ( WCV_Vendors::is_vendor_page() ) { $vendor_shop = urldecode( get_query_var( 'vendor_shop' ) ); $vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop ); $store_icon_src = wp_get_attachment_image_src( get_user_meta( $vendor_id, '_wcv_store_icon_id', true ), 'full' ); // see if the array is valid if ( is_array( $store_icon_src ) ) { $img = $store_icon_src[0]; } return $img; } } add_filter( 'wpseo_opengraph_image', 'my_opengraph_image', 10, 1 );
David RParticipantYes, ben, because I checked for template changes is exactly why I asked.
It is true that those files are not overridden within OneSocial, per se. However, the addon from BuddyBoss (BuddyBoss Marketplace) that makes it work nicely with WCV does contain some of those template files.
Thus, I don’t know how safe it is to update.
[EDIT] You corrected yourself before I could. Kudos. 🙂
David RParticipantI am using the OneSocial theme.
David RParticipantFigured a reply here might be better than opening a new topic.
Is there a way for us to get each vendor’s shop page to have its store icon used as the featured image for that shop page? Presently, I can’t get that store icon to be used for Open Graph tags, which is making the sharing of shop pages look bad.
David RParticipantA couple photos
David RParticipantYou’re not the only one who would like to have this addon; I would too, even if it means another purchase. But you should really put feature requests in the Feature Requests forum.
David RParticipantAlright, but that code adds a link displayed as a tab. I’m wondering if I can add an actual tab; clicking on it would be just like clicking on the Products or Coupons tab, but I would define the contents of that new tab?
David RParticipant@ben, I played around with that, but all it’s doing is eliminating all the tabs, except for “Dashboard” and “View Store”.
David RParticipantMay want to watch this: https://core.trac.wordpress.org/ticket/14459
June 7, 2016 at 3:14 pm in reply to: Making attributes avaiable by category – anyone found a plugin/way to do this? #34158David RParticipantHypothetically…
Depending on the plugin being used, you could have the appropriate filter widgets displayed conditionally. That might not be too hard for pages dedicated to a particular category. However, since you’re probably using a category filter to limit the display, the condition that needs to be met is the status of the category filter widget. That’s tough.
David RParticipantOK. Thanks.
David RParticipantBrowsing history on Github, I can’t figure out at which point the handling of an empty email was removed from the PayPal AP class, but it must have been removed as unnecessary code as soon as you guys wrote the code to pass the vendor account email when the paypal one was null.
The
get_receivers
function, when it’s handlinginstapay
, runs theforeach
thru the receivers. It doesn’t check that it’s receiving an email address; it’s assumed.David RParticipantDeleting that line results in an error when trying to purchase items from a vendor with no paypal address set:
Error ID: 580001. Invalid request: None of the fields are specified to identify a receiver Error ID: 580022. Invalid request parameter: payKey cannot be null
David RParticipantLooking at the code, I think the breakdown must be happening with
public static function get_vendor_from_product( $product_id )
I think that’s not returning the right
$author
, which causes theget_commission_rate
function to fail to retrieve a$vendor_commission
, which results in the default commission being used.David RParticipantI figured it out.
class-vendors.php —
public static function get_vendor_paypal( $vendor_id ) { $paypal = get_user_meta( $vendor_id, $meta_key = 'pv_paypal', true ); $paypal = !empty( $paypal ) ? $paypal : get_the_author_meta( 'user_email', $vendor_id, false ); return $paypal; }
Is it possible to redefine that behavior safely inside my functions.php file, so as to be upgrade-safe?
David RParticipantThanks. Unfortunately, my expedition left me empty-handed.
This was easily the most relevant commit: https://github.com/wcvendors/wcvendors/commit/5180bbb0b4c87a4396518c2cf819f23322beaea8
But it’s not what I need, obviously. I’ll keep searching, but if you know where I should look…
David RParticipantNo, you’re right the second time. I would like the behavior to be the old way on my site though.
David RParticipantIs there a way for me to change this such that only the admin gets paid?
David RParticipantI can confirm that is not what’s happening, atleast not with variable products. When I checkout with a variable product in my cart, and the vendor has no PayPal address set, then the PayPal payment screen shows the admin and the vendor’s email address as recipients.
David RParticipantAny update on this, @digitalchild ? Specifically, the last two things I mentioned: #32512 & #32513
I’m not getting the proper commission on variable products when the vendor’s commission is set differently than the store default.
David RParticipantThanks, Jamie.
Quick question: If I set a coupon type to percentage and enter a decimal value (eg. 7.5), will that process correctly? When I first saw that I was limited to integers, I thought it might have had to do with how percentages are processed.
David RParticipantPayPal was working fine. Now I’m getting this same error. Everything is up-to-date. I don’t know where to begin to look.
EDIT: Mine is slightly different. I’ll open a new topic.
David RParticipant@ben, I hope you don’t mind me tagging along here…
It appears, on the demo site and on my own site, that the vendor who sells a variable product is unable to see what variation was ordered, atleast not on the Dashboard. The basic view doesn’t show the variation, and the order details pop-up doesn’t show the variation ordered either.
David RParticipant@ben, with all due respect, stop talking and get back to work. 😉
From now until the shipping system revision is complete, just respond to every shipping question by linking to your post above.
BTW, I think adding those two options you mentioned should be good enough. Not that it matters, but if I understand the logic involved, I think you guys will be able to implement it just fine.
I want to write more, but I don’t want you to needlessly read my rambling words. 🙂
David RParticipantWhat’s happening is that the system is telling PayPal to make a split payment, and the two receiving accounts are [email protected] & [email protected]. Since the two receivers are identical, PayPal throws a fit.
This appears to be a bug in WCV, in that you said your setting for the vendor in question are such that he should receive no shipping and no part of the payment. If it is, Jamie will find it shortly, and I’m sure he’ll fix it. In the meantime, what you can do is set the vendor to receive 100%. By doing that, he receives both shipping and full payment, and you(the admin-you) get cut out completely. But that won’t matter in this case, since you are both admin and vendor. That’s my advice. No warranty.
David RParticipantAnd now I’ve found that while my simple products that are set to “Free National Shipping” do, in fact, show up as free shipping, the variable products that are set to Free Shipping do not actually show up as free shipping in the cart or during checkout.
EDIT: I just confirmed that this is happening on the demo site (http://dev.wcvendors.com/): http://dev.wcvendors.com/shop/uncategorized/garbage/?attribute_pa_color=black
David RParticipant1 & 2 – Those are the settings I have configured. For simple products, the vendor receives nothing but the shipping, when they should be receiving nothing at all. For variable products, the Storewide settings are being used, rather than the override settings.
David RParticipantIssue 1 – Vendor Commission Override Not Working on Variable Products
Issue 2 – Don’t give shipping to one particular vendorUnfortunately, I cannot check vendor overrides on the demo site. I’ll go update my development site and do some testing.
Regarding my initial question, it seems to boil down to needing a function that will override my default store setting of “give shipping to vendors” if the vendor is the vendor I specify, probably by ID. Unless I’m mistaken and there’s a method of accomplishing this already built into Pro.
David RParticipantI just checked with a simple product and then with a variable product.
With a simple product, the commission override for the vendor worked fine. With the variable product, the override wasn’t ignored and the default was used.
David RParticipantIn this case, the checkout page shows:
Subtotal $75.98 (2 line-items)
Shipping $10.00 (Vendor Shipping)
Total $85.98PayPal shows:
To Vendor: $83.60
To Admin: $2.38
Total: $85.98My default commission is %+Fee : 97% + 0.05
So, the commission calculation is the default. The override isn’t working.
David RParticipantI actually cleaned mine up and switched it up. Since it’s best practice to enqueue scripts…
function google_load_file() { if ( is_post_type_archive('product') && !is_shop() ) { $url = get_permalink(); $item_id = url_to_postid( $url ); $vendor = get_post_field( 'post_author', $post_id ); $name = get_user_meta( $vendor, 'pv_shop_name', true ); } elseif ( is_singular('product') ) { $this_post = get_queried_object(); $name = get_user_meta( $this_post->post_author, 'pv_shop_name', true ); } wp_enqueue_script( 'author-tracking', get_stylesheet_directory_uri() . '/js/google.js', array(), NULL, false ); wp_localize_script( 'author-tracking', 'author', array( 'name' => $name ) ); } add_action( 'wp_enqueue_scripts', 'google_load_file' );
google.js sits in the child theme /js/ folder and looks like
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'Property ID HERE', 'auto'); ga('set', 'dimension1', author.name ); ga('send', 'pageview');
@digitalchild, I think I’ll have to combine ours, since yours is clearly more efficient. -
AuthorPosts