Jump to content

sphinx.ganesh

Members
  • Posts

    5
  • Joined

  • Last visited

Profile Information

  • Location
    Pune
  • Activity
    Web development agency

sphinx.ganesh's Achievements

Newbie

Newbie (1/14)

0

Reputation

1

Community Answers

  1. Hi, i resolved it. Just needed to add following - $this->display_header = false; $this->display_footer = false; Thanks
  2. Hello, I'm trying to call Ajax containing the HTML from .tpl file. But the html contains Header and Footer which applied for the theme. I want only that specific block, so i can place it other page. Here is the code - AJAX Call from .js - $("#message_occasion").change(function() { if($(this).val()=='') { $('#disp_giftcard_contents').html(''); } else { $.ajax({ type:'post', url:baseUri + 'index.php?controller=giftgallery', data:'occasion_id='+$(this).val(), success:function(resp) { $('#disp_giftcard_contents').html(resp); } }); } }); -------------------------------------------------------------------------------- GiftGalleryController - class GiftGalleryController extends FrontController{ public $php_self = 'giftgallery'; public function setMedia() { parent::setMedia(); $this->addJS(_THEME_JS_DIR_.'checkout.js'); $this->addJS(_THEME_JS_DIR_.'image-picker.js'); $this->addCSS(_THEME_CSS_DIR_.'image-picker.css'); } public function init() { parent::init(); $this->display_column_left = false; $this->display_column_right = false; } public function initContent() { parent::initContent(); if(isset($_REQUEST['occasion_id']) && $_REQUEST['occasion_id']!='') { $occasion_gallery = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT gallery_id, image_url, image_title, occasion_id FROM '._DB_PREFIX_.'gift_gallery WHERE occasion_id = '.$_REQUEST['occasion_id'].' AND active=1 order by occasion_id asc'); $this->context->smarty->assign(array( 'occasion_gallery' => $occasion_gallery )); $this->setTemplate(_PS_THEME_DIR_.'gift-gallery.tpl'); } } } -------------------------------------------------------------------------------- gift-gallery.tpl - <select class="image-picker masonry show-html" id="message_giftgallery" name="message_giftgallery" autocomplete="off"> {foreach from=$occasion_gallery item=og} <option data-img-src="{$og['image_url']}" data-img-label='{$og['image_title']}' value="{$og['gallery_id']}">{$og['image_title']}</option> {/foreach} </select> As you can see, i need only dropdown box to be get as response from Ajax, but i'm getting whole HTML. What should i do for this ?
  3. Hi, I already setup all combinations and prices. They are displaying perfectly as i shown in attachment. But i have question for 'Product List'. If i select any combination on product list and click on 'Add to Cart', then selected combination price is does not get added in Cart. Only default 'Price' gets added. I want to add selected combination price to be get add in cart from Product List. Here is the URL to check what i'm talking about - http://symphony-solution.com/sendwowgifts/21-send-gift-card
  4. Hi All, As per my requirement i want to add Selected attribute specific price for the product from Product List to the Cart. My product page contains 'Gift Vouchers' and each gift voucher can be of various type in the format of their price. (like voucher of R.5000, Rs.3000, Rs.1000,... etc). Now on the product list i'm showing all the options as an Attributes for that product. And every attribute have specific price. Also there is a Default Price added for Product / Voucher (Say Rs.5000). So when if i select Voucher of Rs.500 from drop down and click on 'Add to Cart', the Price which is related to that attribute should get added to the cart. But only default price (Rs.5000) gets added n cart. Please see the attachment and help me with suggestions.
×
×
  • Create New...