Skip to content

Instantly share code, notes, and snippets.

View aveevan's full-sized avatar

Aveevan aveevan

View GitHub Profile
@aveevan
aveevan / app->code->community->Brst->Test->Model->Observer.php
Last active June 25, 2019 06:55
How to do selected single product should be purchase alone?
<?php
Mage::log('Hy observer called', null, 'logfile.log');
class Brst_Test_Model_Observer
{
//Put any event as per your requirement
public function logCartAdd() {
$product = Mage::getModel('catalog/product')
->load(Mage::app()->getRequest()->getParam('product', 0));
$cart_qty = (int) Mage::getModel('checkout/cart')->getQuote()->getItemsQty();
@aveevan
aveevan / fetch_data.php
Created June 18, 2019 12:27
add-to-cart
<?php
//fetch_data.php
include('database_connection.php');
if(isset($_POST["action"]))
{
$query = "
SELECT * FROM voice_bank_data WHERE voice_status = '1'
@aveevan
aveevan / fetch_data.php
Created June 18, 2019 11:29
Audio File - Add to Cart
<?php
//fetch_data.php
include('database_connection.php');
if(isset($_POST["action"]))
{
$query = "
SELECT * FROM voice_bank_data WHERE voice_status = '1'