Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114 Add "add to card" functionality to widget.pgp | Event Espresso - Staging Server
<code> $params = array(
//REQUIRED, the id of the event that needs to be added to the cart
'event_id' => $event->id,
//REQUIRED, Anchor of the link, can use text or image
'anchor' => __("Add to Cart", 'event_espresso'), //'anchor' => '<img src="' . EVENT_ESPRESSO_PLUGINFULLURL . 'images/cart_add.png" />',
//REQUIRED, if not available at this point, use the next line before this array declaration
// $event_name = get_event_field('event_name', EVENTS_DETAIL_TABLE, ' WHERE id = ' . $event_id);
'event_name' => $event->event_name,
//OPTIONAL, will place this term before the link
'separator' => __(" ", 'event_espresso')
);
$cart_link = event_espresso_cart_link($params);
echo $cart_link;</code>
<code><?php
$params = array(
//REQUIRED, the id of the event that needs to be added to the cart
'event_id' => $event->id,
//REQUIRED, Anchor of the link, can use text or image
'anchor' => __("Add to Cart", 'event_espresso'), //'anchor' => '<img src="' . EVENT_ESPRESSO_PLUGINFULLURL . 'images/cart_add.png" />',
//REQUIRED, if not available at this point, use the next line before this array declaration
// $event_name = get_event_field('event_name', EVENTS_DETAIL_TABLE, ' WHERE id = ' . $event_id);
'event_name' => $event->event_name,
//OPTIONAL, will place this term before the link
'separator' => __(" ", 'event_espresso')
);
$cart_link = event_espresso_cart_link($params);
echo $cart_link;
?> </code>
oh .. well place delete the double posted answer. I tried to made a better post view of the code.. It failed.
Viewing 3 reply threads
The support post ‘Add "add to card" functionality to widget.pgp’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.