Add checkout cart display to notice.php

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #64529

I would like to add the cart display to the modal popup when you add a product to your cart.

This way, customers can chose to keep shopping or proceed to checkout based on the information in the modal.

I tried to add the code from the checkout cart.php to the notice.php and it would not display.

Some ideas on how best to proceed would be helpful.

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #64658

Here is the code I have so far:

<?php
/**
 * @package    HikaShop for Joomla!
 * @version    1.6.0
 * @author    hikashop.com
 * @copyright  (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<?php $cart_type = JRequest::getString('cart_type','cart'); ?>
<script type="text/javascript">
setTimeout( 'try{  window.top.document.getElementById(\'sbox-window\').close(); }catch(err){ window.top.SqueezeBox.close(); }', 99999999<?php //echo (int)$this->config->get('popup_display_time',2000);?> );
</script>
<div id="cart" class="hikashop_notice_box_content" >

  <div class="hd" style="cursor: auto; "><h1 class="hd-heading-modal">My Cart</h1></div>

    <div class="bd">

                <table>
            <tbody><tr>
                <th colspan="2" width="200">Item</th>
                <th>Quantity</th>
                <th>&nbsp;</th>
                <th>Price</th>
                <th>&nbsp;</th>
                <th>Total</th>
                <th>&nbsp;</th>
            </tr>
                <tr>
                <td colspan="2" width="200"></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
              </tr>
              
                                    <tr class="buttons">
                <td colspan="2"><div id="hikashop_add_to_cart_continue_div">
    <?php echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','try{  window.top.document.getElementById(\'sbox-window\').close(); }catch(err){ window.top.SqueezeBox.close(); } return false;','class="icon-undo icon-large btn btn-info"'); ?>
  </div></td>
                <td>   <i href="#" class="icon-refresh icon-large btn" onclick="var qty_field = document.getElementById('hikashop_checkout_quantity_48'); if (qty_field &amp;&amp; qty_field.value != '1'){ qty_field.form.submit(); } return false;" title="Refresh">                     
                  </i></td>
                <td>&nbsp;</td>
                <td><strong>Subtotal</strong></td>
                <td>=</td>
                <td><strong>$0.00</strong></td>
                <td>  <div id="hikashop_add_to_cart_checkout_div">
    <?php echo $this->cartClass->displayButton(JText::_('PROCEED_TO_CHECKOUT'),'to_checkout',$this->params,hikashop_completeLink('checkout'.$this->url_itemid),'window.top.location=\''.hikashop_completeLink('checkout'.$this->url_itemid).'\';return false;','class="icon-lock icon-large btn btn-success"'); ?>
  </div></td>
            </tr>
        </tbody></table>

    </div>

What can I add to display the image, price, quantity, total? I think there must be way through the views to make it happen. You can see the site right now at:

Shaggy Chic Boutique

a sample page where you can click on the 'add to cart' to see the current modal is:

Shaggy Chic Boutique Flour Sack Towels

Any guidance would be greatly appreciated.

The following user(s) said Thank You: armanemadi

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
12 years 2 months ago #64679

You should instead use the module anywhere extension ( extensions.joomla.org/extensions/core-en...embed-a-include/6402 ) and just add the tag to load the cart module in that view. The rest will be taken care of automatically.

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #64683

Just to be clear. I would like to add the content from view---checkout---(cart) to the modal. Is this possible as you described?

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
12 years 2 months ago #64684

No I'm talking about the content of the view product/cart which is used by the cart module.

For the checkout cart, you would have to load all the cart data like we do in the cart function of the view.html.php file of the checkout view (not easy), while for the product cart, it's really easy to do with the module anywhere extension.

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #64686

That doesn't support showing an image though correct?

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #64687

Just tried it and it will not work in the modal.

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
12 years 2 months ago #64688

Indeed it won't support the display of the images.

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #64690

Right, so, modules anywhere won't place the module in the notice.php, any other ideas?

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
12 years 2 months ago #64695

No. If that doesn't work, then the cart display would have to be coded manually in the notice view, but that's definitely not easy.

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #64699

Can you manage it for $40 US?

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
12 years 2 months ago #64709

That won't be possible. I invite you to post a message on our commercial jobs board and on joomlancers.com

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
12 years 2 months ago #64720

Ok, thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 49
  • Thank you received: 0
9 years 10 months ago #185088

hi

can i change the pop up fram to something like this .

i dont like it , it is not fast , and need to page referesh , where is jquery file , can i change it to get some effect .
also i need animation for add to cart button. like a small image of my product go over basket . some store do it in pop up and some other in same page of product

tanks


With them the Seed of Wisdom did I sow,
And with my own hand labour’d it to grow:
And this was all the Harvest that I reap’d—
“I came like Water, and like Wind I go.”

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
9 years 10 months ago #185094

Hi,

The add to cart system in handled by the file administrator/components/com_hikashop/helpers/cart.php
So if you need to add effects to it, remove the page reload, etc, you can do it there.
Note that this requires complex modifications of the code so unless you know what you're doing I would not recommend modifying that file.

Please Log in or Create an account to join the conversation.

Time to create page: 0.083 seconds
Powered by Kunena Forum