- Posts: 70
Feature Requests
Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.
Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.
VM Addtocart Button in JOOMDLE Course Details Page
- shekar
-
Topic Author
- Offline
- Senior Member
-
Less
More
15 years 6 months ago - 15 years 6 months ago #1
by shekar
File: joomla\components\com_joomdle\views\detail\tmpl\default.php
File: joomla\administrator\components\com_joomdle\helpers\shop.php
VM Addtocart Button in JOOMDLE Course Details Page was created by shekar
File: joomla\components\com_joomdle\views\detail\tmpl\default.php
Code:
$shop_pid = JRoute::_(JoomdleHelperShop::get_shop_pid ($course_info['remoteid']));
<form action="http://localhost/joomla/index.php" method="post" name="addtocart" id="addtocart_4cdc516ccdd7d" class="addtocart_form" onsubmit="handleAddToCart( this.id );return false;">
<input type="hidden" name="prod_id[]" value="<?php echo $shop_pid; ?>" />
<input type="hidden" id="quantity9" name="quantity[]" value="1" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="flypage" value="shop.flypage.tpl" />
<input type="hidden" name="page" value="shop.cart" />
<input type="hidden" name="Itemid" value="1" />
<input type="hidden" name="func" value="cartAdd" />
<input type="submit" class="addtocart_button_module" value="Add to Cart" title="Buy this" />
</form>
File: joomla\administrator\components\com_joomdle\helpers\shop.php
Code:
function get_shop_pid ($course_id)
{
$db =& JFactory::getDBO();
$query = 'SELECT product_id' .
' FROM #__vm_product' .
' WHERE product_sku =';
$query .= $db->Quote($course_id) . " and product_publish='Y'";
$db->setQuery($query);
$product = $db->loadObjectList();
$product_id = $product[0]->product_id;
$shop_pid ="$product_id";
return $shop_pid;
}
Last edit: 15 years 6 months ago by shekar.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7926
15 years 6 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic Re: VM Addtocart button in JOOMLDE Course Details Page
Thank you very much for your contribution.
I will test it as soon as I have the time, and include it for next release.
Thanks again,
Antonio
I will test it as soon as I have the time, and include it for next release.
Thanks again,
Antonio
Please Log in or Create an account to join the conversation.
- Paulo Cezar Diniz Junior
- Offline
- New Member
-
Less
More
- Posts: 5
14 years 2 months ago #3
by Paulo Cezar Diniz Junior
Replied by Paulo Cezar Diniz Junior on topic Re: VM Addtocart button in JOOMLDE Course Details Page
Antonio, this function are planned to release 0.8?
Thank you
Paulo
Thank you
Paulo
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7926
14 years 2 months ago #4
by Antonio Durán
Replied by Antonio Durán on topic Re: VM Addtocart button in JOOMLDE Course Details Page
No, this was finally not included.
I think it would be better to implement this as a plugin.... will think about it for a future release.
I think it would be better to implement this as a plugin.... will think about it for a future release.
Please Log in or Create an account to join the conversation.
- Paulo Cezar Diniz Junior
- Offline
- New Member
-
Less
More
- Posts: 5
14 years 2 months ago #5
by Paulo Cezar Diniz Junior
Replied by Paulo Cezar Diniz Junior on topic Re: VM Addtocart button in JOOMLDE Course Details Page
Sounds good, should be better.
Please Log in or Create an account to join the conversation.