Author Topic: How To Show PayPal & Checkout "Add To Cart Button" in the VM  (Read 2573 times)

bernardfenley

  • Beginner
  • *
  • Posts: 11
How To Show PayPal & Checkout "Add To Cart Button" in the VM
« on: September 07, 2011, 03:27:49 am »
I have correctly added Credit Card & PayPal method of payment. However, I'm having problem showing the "add to card button" on the shop/products.

Is anyone have a solution?

Thanks,
Bernard

bernardfenley

  • Beginner
  • *
  • Posts: 11
Re: How To Show PayPal & Checkout "Add To Cart Button" in the VM
« Reply #1 on: September 07, 2011, 04:49:52 am »
Please HELP!

MobiVM

  • Jr. Member
  • **
  • Posts: 267
    • Native Mobile Apps for VritueMart
Re: How To Show PayPal & Checkout "Add To Cart Button" in the VM
« Reply #2 on: September 07, 2011, 07:17:44 am »
Hello,

Can you provide site url?

Best Regards,
Trivedi kartik.
Native mobile Apps for VirtueMart! Visit http://www.ivmstore.com

bernardfenley

  • Beginner
  • *
  • Posts: 11
Re: How To Show PayPal & Checkout "Add To Cart Button" in the VM
« Reply #3 on: September 08, 2011, 04:23:15 am »
Here is the home page url http://greenmyfleet.com/

Thanks,
Bernard

MobiVM

  • Jr. Member
  • **
  • Posts: 267
    • Native Mobile Apps for VritueMart
Re: How To Show PayPal & Checkout "Add To Cart Button" in the VM
« Reply #4 on: September 08, 2011, 13:39:33 pm »
Hello,

Can you please replace your code with the below code in file:-

Components\com_virtuemart\themes\default\templates\product_details\includes\addtocart_form.tpl.php

Quote
<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); ?>

<div class="vmCartContainer">
   
<?php
mm_showMyFileName(__FILE__);
// This function lists all product children ( = Items)
// or, when not children are defined, the product_id
// SO LEAVE THIS IN HERE!
list($html,$children) = $ps_product_attribute->list_attribute( ( $product_parent_id > 0 )  ? $product_parent_id : $product_id );

if ($children != "multi") {

    if( CHECK_STOCK == '1' && ( $product_in_stock < 1 ) ) {
        $notify = true;
    } else {
       $notify = false;
    }

?>
    <form action="<?php echo $mm_action_url ?>index.php" method="post" name="addtocart" id="<?php echo uniqid('addtocart_') ?>" class="addtocart_form" <?php if( $this->get_cfg( 'useAjaxCartActions', 1 ) && !$notify ) { echo 'onsubmit="handleAddToCart( this.id );return false;"'; } ?>>

<?php
}
echo $html;

if (USE_AS_CATALOGUE != '1' && $product_price != "" && !stristr( $product_price, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') )) {
   ?>
        <?php if ($children != "multi") { ?>
    <div style="float: right;vertical-align: middle;"> <?php
    if ($children == "drop") {
       echo $ps_product_attribute->show_quantity_box($product_id,$product_id);
    }
    if ($children == "radio") {
      echo $ps_product_attribute->show_radio_quantity_box();
    }
    $button_lbl = $VM_LANG->_('PHPSHOP_CART_ADD_TO');
    $button_cls = 'addtocart_button';
    if( CHECK_STOCK == '1' && ( $product_in_stock < 1) ) {
        $button_lbl = $VM_LANG->_('VM_CART_NOTIFY');
        $button_cls = 'notify_button';
    }
    ?>   
    <input type="submit" class="<?php echo $button_cls ?>" value="<?php echo $button_lbl ?>" title="<?php echo $button_lbl ?>" />
    </div>
    <?php  } ?>   
    <input type="hidden" name="flypage" value="shop.<?php echo $flypage ?>" />
   <input type="hidden" name="page" value="shop.cart" />
    <input type="hidden" name="manufacturer_id" value="<?php echo $manufacturer_id ?>" />
    <input type="hidden" name="category_id" value="<?php echo $category_id ?>" />
    <input type="hidden" name="func" value="cartAdd" />
    <input type="hidden" name="option" value="<?php echo $option ?>" />
    <input type="hidden" name="Itemid" value="<?php echo $Itemid ?>" />
    <input type="hidden" name="set_price[]" value="" />
    <input type="hidden" name="adjust_price[]" value="" />
    <input type="hidden" name="master_product[]" value="" />
    <?php
}
if ($children != "multi") { ?>
   </form>
<?php
}
    if($children == "radio") { ?>
   
    <script language="JavaScript" type="text/javascript">//<![CDATA[
    function alterQuantity(myForm) {
        for (i=0;i<myForm.selItem.length;i++){
            setQuantity = myForm.elements['quantity'];
            selected = myForm.elements['selItem'];
            j = selected.id.substr(7);
            k= document.getElementById('quantity' + j);
            if (selected.checked==true){
                k.value = myForm.quantity_adjust.value; }
            else {
                k.value  = 0;
            }
        }
    }
   //]]>   
   </script>
<?php } ?>
</div>


Best Regards,
Trivedi kartik.
Native mobile Apps for VirtueMart! Visit http://www.ivmstore.com

bernardfenley

  • Beginner
  • *
  • Posts: 11
Re: How To Show PayPal & Checkout "Add To Cart Button" in the VM
« Reply #5 on: September 08, 2011, 18:10:07 pm »
I have changed it. But the add to cart button does not show.

MobiVM

  • Jr. Member
  • **
  • Posts: 267
    • Native Mobile Apps for VritueMart
Re: How To Show PayPal & Checkout "Add To Cart Button" in the VM
« Reply #6 on: September 09, 2011, 06:45:28 am »
Hello,

I think the issue is with your template.

Can you change just template from administrator and check that add to cart button is coming or not?

Administrator->Extension->template manager->rhuk_milkyway(select this as a default) and try.

Best Regards,
Trivedi kartik.

Native mobile Apps for VirtueMart! Visit http://www.ivmstore.com

bernardfenley

  • Beginner
  • *
  • Posts: 11
Re: How To Show PayPal & Checkout "Add To Cart Button" in the VM
« Reply #7 on: September 09, 2011, 08:09:34 am »
Thanks for the reply. I really appreciate it.

How to set rhuk_milkyway as a default?

Thanks

bernardfenley

  • Beginner
  • *
  • Posts: 11
Re: How To Show PayPal & Checkout "Add To Cart Button" in the VM
« Reply #8 on: September 09, 2011, 08:19:29 am »
This payment method allows automatic Order Status Updates. There's a file in /administrator/
components/com_virtuemart/ which is called notify.php. You will need to enter the
appropriate URL (web address) for the script file in PayPal’s control panel. When a customer finishes
the Payment, the PayPal server connects to this script on your server. When the transaction AND the
payment have been successful, the order status is automatically updated to the status you have set in
the PayPal configuration form.

I think this one could also a problem, what is the appropriate url mentioned here? And where to place it?

Thanks

bernardfenley

  • Beginner
  • *
  • Posts: 11
Re: How To Show PayPal & Checkout "Add To Cart Button" in the VM
« Reply #9 on: September 09, 2011, 08:45:54 am »
Hello,

I think the issue is with your template.

Can you change just template from administrator and check that add to cart button is coming or not?

Administrator->Extension->template manager->rhuk_milkyway(select this as a default) and try.

Best Regards,
Trivedi kartik.

I just changed the template to  rhuk_milkyway but still the check out with paypal doesn't show.

More help please.

Thanks

MobiVM

  • Jr. Member
  • **
  • Posts: 267
    • Native Mobile Apps for VritueMart
Re: How To Show PayPal & Checkout "Add To Cart Button" in the VM
« Reply #10 on: September 09, 2011, 08:54:40 am »
Hello,

Can you check below through administrator->vrituremart->store->List Payment Methods->in that list option 13 is enable or not.

Please check and let me know!

Best Regards,
Trivedi kartik.
Native mobile Apps for VirtueMart! Visit http://www.ivmstore.com

bernardfenley

  • Beginner
  • *
  • Posts: 11
Re: How To Show PayPal & Checkout "Add To Cart Button" in the VM
« Reply #11 on: September 09, 2011, 09:00:43 am »
#      Name   Code   Discount   Shopper Group   Payment method type   Active   Remove
1      2Checkout   2CO   $0.00   -default-   HTML-Form based (e.g. PayPal)      
2      Credit Card   AN   $0.00   -default-   Use Payment Processor      
3      Credit Card (eProcessingNetwork)   EPN   $0.00   -default-   Use Payment Processor      
4      Credit Card (PayMeNow)   PN   $0.00   -default-   Use Payment Processor      
5      Dankort / PBS   PBS   $0.00   -default-   HTML-Form based (e.g. PayPal)      
6      eCheck.net   ECK   $0.00   -default-   Bank debit      
7      ePay   EPAY   $0.00   -default-   HTML-Form based (e.g. PayPal)      
8      eWay   EWAY   $0.00   -default-   Use Payment Processor      
9      iKobo   IK   $0.00   -default-   HTML-Form based (e.g. PayPal)      
10      iTransact   ITR   $0.00   -default-   HTML-Form based (e.g. PayPal)      
11      NoChex   NOCHEX   $0.00   -default-   HTML-Form based (e.g. PayPal)      
12      Pay by Credit Card - You will be contacted before card is run   CCCALL   $0.00   -default-   Credit Card      
13      PayMate   PM   $0.00   -default-   HTML-Form based (e.g. PayPal)      the item 13 is marked unpublished witch is labeled by "x"
14      PayPal   PP   $0.00   -default-   HTML-Form based (e.g. PayPal)      
15      Verisign PayFlow Pro   PFP   $0.00   -default-   Use Payment Processor      
16      WorldPay   WP   $0.00   -default-   HTML-Form based (e.g. PayPal)      
17      Purchase Order   PO   $0.00   Gold Level   Address only / Cash on Delivery      
18      Cash On Delivery   COD   -$2.00   -default-   Address only / Cash on Delivery      

Should I change this to publish?

Thanks