Forum Replies Created
-
AuthorPosts
-
stalyanParticipant
I added this code to functions.php of my theme and it solved the problem.
function AddToCartByProductID( $atts ) {
$args= shortcode_atts(
array (
‘id’ => 0
),
$atts );
return get_button_code_for_product($args);
}
add_shortcode( ‘add_to_cart_by_prod_id’, ‘AddToCartByProductID’);
Thanks for your help this thread can be closed if you want.
May 9, 2020 at 6:09 am in reply to: Encrypted donwload links not displayed in the Thank You page. #80542stalyanParticipantSolved, this can be closed thanks.
May 8, 2020 at 11:43 pm in reply to: Encrypted donwload links not displayed in the Thank You page. #80541stalyanParticipantFantastic thanks @wzp!
Edit:I see a collateral issue. When clicking on the link, there is a transition where the text disappears, but the link is still actually there. If you click on that space again, then the .mp3 file will be downloaded.
I edited the .htaccess on my server but the mp3 does not download directly. In what section should i paste the code?
Thanks in advance,
May 8, 2020 at 7:35 pm in reply to: Encrypted donwload links not displayed in the Thank You page. #80539stalyanParticipantThe only issue now is that when clicking the encrypted link, another tab is opened and the mp3 file is reproduced instead of being download. How to achieve that it is downloaded and prevent it from opening another tab?
May 8, 2020 at 7:22 pm in reply to: Encrypted donwload links not displayed in the Thank You page. #80538stalyanParticipantOoooMGG I can’t believe it…. i think i spent almost the same time as the guy in the following thread testing and I was to give up the same as him, i went through the same stage of self denial lol….
The solution is here: https://support.tipsandtricks-hq.com/forums/topic/thank-you-page-not-giving-encrypted-links-lots-of-troubleshooting-already
The problem was that i was using my Official Paypal account token and not the Merchant Sandox Token.
I wanted to point out that the shortcode [wp_eStore_display_transaction_result] to add on the ThankYou page that is given here:
https://www.tipsandtricks-hq.com/ecommerce/wp-estore-instant-digital-product-delivery-499
is different that the one [wp_eStore_transaction_result:end] given in the thread of the guy where the solution is stated. What’s the difference?
stalyanParticipantThanks for the info.
I managed to complete the first part of the problem, that is getting the productID from post custom data and add it to the eStore PHP code.
<?php
$customMeta = get_post_meta(get_the_ID(), ‘eStoreProductID’, TRUE);
printf( ‘The value of my post meta is %s’, $customMeta );
echo show_product_fancy_style($customMeta);
?>
I used XYZ PHP Code to create a shortcode of this. Then if I put this shortcode called RetrieveCustomMetaToVariable on a post that has custom data ‘eStoreProductID’, which has the same value of the product id in eStore, it will display the correct Add to Cart button and associated info.
Now my problem is how to pass this into the Essential Grid Skin editor (EGSE) so the Add to Cart button is displayed within each song cover in the grid. EGSE has a HTML/Text form but i cannot use it to post XYZ PHP Code shortcodes. Also, I cannot post any eStore HTML shortdcode in the form because the productid of eStore HTML shortcodes must be a fixed number and not a variable. If I paste PHP code directly there it just does not work either.
I found this in Essential Grid customer support: https://www.themepunch.com/faq/create-a-custom-shortcode-in-essential-grid/
It’s my only hope to somehow try to adapt the PHP code that I posted to create a shortcode as specified in the link above, but using the eStoreProductID variable as a function argument that I can use as argument of this newly created shortcode that Essential Grid should recognize.
[AddToCartButton %eStoreProductID%]
I must say i do not know PHP but I have some basic programming understanding.
If you mind, please let this thread open for if someone has faced this issue and can help, or so that I can post a solution that anyone can profit from in hopefully a few days when i figure this out.
Thanks in advance,
Abel
-
AuthorPosts