Author Topic: Cart Page Fields & Modifications  (Read 98810 times)

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Cart Page Fields & Modifications
« Reply #15 on: November 13, 2012, 22:24:54 pm »
views/cart/tmpl/default_pricelist.php

right after this
<div class="billto-shipto">

I do NOT do development work for hire.

illPhever

  • Beginner
  • *
  • Posts: 12
Re: Cart Page Fields & Modifications
« Reply #16 on: January 03, 2013, 20:26:33 pm »
Hello,

Thanks for the tips.  I think this is what I need to make sure the tax does not show up in my cart until a shipping address is provided:

<?php if (empty($this->cart->BT)){ ?> What you put here will be shown when NO billing address is completed<?php }?>

I have already setup a template override, but where in default_pricelist.php does this code go? 

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Cart Page Fields & Modifications
« Reply #17 on: January 03, 2013, 22:38:00 pm »
Hello,

Thanks for the tips.  I think this is what I need to make sure the tax does not show up in my cart until a shipping address is provided:

<?php if (empty($this->cart->BT)){ ?> What you put here will be shown when NO billing address is completed<?php }?>

I have already setup a template override, but where in default_pricelist.php does this code go? 


if you are not familiar with php.

You should do the 2nd suggestion

all you have to do is add this
<?php if (empty($this->cart->BT)){ $rule=Null;}?>

after this
<?php foreach($this->cart->cartData['taxRulesBill'] as $rule){ ?>


See example below

<?php foreach($this->cart->cartData['taxRulesBill'] as $rule){ ?>
      <?php if (empty($this->cart->BT)){ $rule=Null;}?>
         <tr class="sectiontableentry<?php $i ?>">
            <td colspan="4" align="right"><?php echo $rule['calc_name'] ?> </td>
            <?php if ( VmConfig::get('show_tax')) { ?>
            <td align="right"><?php echo $this->currencyDisplay->createPriceDiv($rule['virtuemart_calc_id'].'Diff','', $this->cart->pricesUnformatted[$rule['virtuemart_calc_id'].'Diff'],false); ?> </td>
             <?php } ?>
            <td align="right"><?php ?> </td>
            <td align="right"><?php echo $this->currencyDisplay->createPriceDiv($rule['virtuemart_calc_id'].'Diff','', $this->cart->pricesUnformatted[$rule['virtuemart_calc_id'].'Diff'],false); ?> </td>
         </tr>
         <?php
         if($i) $i=1; else $i=0;
      }
 ?>

This code <?php if (empty($this->cart->BT)){ $rule=Null;}?>   sets the rule to Null if the billing is not filled in


I do NOT do development work for hire.

illPhever

  • Beginner
  • *
  • Posts: 12
Re: Cart Page Fields & Modifications
« Reply #18 on: January 04, 2013, 15:27:53 pm »
That's a little better, it takes the Tax line item out of the cart, but the Total still calculates the the tax amount prior to adding a shipping address. And when I use the code suggested to "subtract the tax from the total", the Total is calculated without the tax but the Tax amount is still visible on the Total line.

prem prakash

  • Beginner
  • *
  • Posts: 1
Modifing th Registration form
« Reply #19 on: January 08, 2013, 16:12:24 pm »
Hi every one ! I need to customize the virtuemart registration form according to the following requirements:-

->I need to add make a new dependent field of locality binded with the dropdown field of states , so that when ever a frotend user is registring at virtuemart he can select the state and after the selection of state the corresponding areas of the selected states can be pulled from the database as the user select states .

->  like wise there is one dependent field of sublocality which is binded with the above mentioned area field .

->Like this i have some field that are need to be validated .
->Now I know that i can create new fields from the admin panel of virtuemart but how to validate them and setup their and interaction with database

->I am using virtuemart 2.0 Latest virsion
 
->kindly help me with this

Thank you .

servlet

  • Jr. Member
  • **
  • Posts: 333
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: Cart Page Fields & Modifications
« Reply #20 on: March 14, 2013, 13:10:59 pm »
Where can I see demo?
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Cart Page Fields & Modifications
« Reply #21 on: March 14, 2013, 13:29:51 pm »
I do NOT do development work for hire.

Maxim Pishnyak

  • Virtuemart 2 is quite bugfree now
  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2657
  • Virtuemart 2 is quite bugfree now
    • Virtuemart Ukraine division
Re: Cart Page Fields & Modifications
« Reply #22 on: March 15, 2013, 12:29:00 pm »
Lol, that post above your post, Pro, really rocks!

It's not enaf to give some advices to VM users nowadays! Each advice MUST have a link to a demo.

Hell, I'll create a petition for this somewhere: "We want DEMO! We want DEMO! We want DEMO!!!"
Virtuemart 2 is quite bugfree now. You can support Community by voting for Project on the JED
http://extensions.joomla.org/extensions/e-commerce/shopping-cart/129/review
Join us in
https://www.facebook.com/virtuemart
https://twitter.com/virtuemart

syntalk

  • Beginner
  • *
  • Posts: 42
Re: Cart Page Fields & Modifications
« Reply #23 on: April 06, 2013, 16:39:52 pm »
Hi,

Would it be possible to add additional "select field" to the cart or as a "step" and make it required? I want to add "preferable delivery time" to the cart page that customer can make a choice of the time the items should be delivered on.
I have a CUSTOM FIELD and can add it to the shippment address or CUSTOMER DETAILS and something like that would be perfect in the cart or as a step.

Many thanks in advance

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Cart Page Fields & Modifications
« Reply #24 on: April 06, 2013, 18:26:56 pm »
Hi,

Would it be possible to add additional "select field" to the cart or as a "step" and make it required? I want to add "preferable delivery time" to the cart page that customer can make a choice of the time the items should be delivered on.
I have a CUSTOM FIELD and can add it to the shippment address or CUSTOMER DETAILS and something like that would be perfect in the cart or as a step.

Many thanks in advance



not without someone custom coding it for you


why not just leave it in the shipping adrres field?
I do NOT do development work for hire.

syntalk

  • Beginner
  • *
  • Posts: 42
Re: Cart Page Fields & Modifications
« Reply #25 on: April 07, 2013, 00:03:36 am »
why not just leave it in the shipping adrres field?

Hi mate and thanks,

Yes, I think it's the best and easiest option for now. However not everyone uses shipping address, in this case I'll need to put this in the normal/invoice address. Also making this available in the cart would make it easier to the customer to change on every order..
Thank you anyway!

Stonedfury

  • Jr. Member
  • **
  • Posts: 266
    • Stonedfury
  • Skype Name: Stonedfury
  • VirtueMart Version: 2.0.24
Re: Cart Page Fields & Modifications
« Reply #26 on: April 19, 2013, 18:33:32 pm »
Here are some fields for modifying the cart page to make it more user friendly.

I use these fields to make my own "checkout steps"

<?php if (empty($this->cart->BT)){ ?> What you put here will be shown when NO billing address is completed<?php }?>

<?php if (!empty($this->cart->BT)){ ?> This shows AFTER the billing Address is completed <?php }?>

<?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?> This shows when the payment has NOT been selected<?php }?>
^^^ "No payment selected" is English, so change it to suit your language

<?php if ($this->cart->cartData['paymentName'] != 'No payment selected') {?> AFTER Payment Has Been Selected<?php }?>
^^ Same language applies here.


This code will change the text from "Add Your Billing" to Edit Your Billing, if the billing is already filled in.
      <?php if (empty($this->cart->BT)){ ?>
      <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT',$this->useXHTML,$this->useSSL) ?>">
      Add Your Billing Address
      </a>   <?php } ?>
<?php if (!empty($this->cart->BT)){ ?>
      <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT',$this->useXHTML,$this->useSSL) ?>">
      Edit Your Billing Address
      </a>   <?php } ?>

This Code will display "Shipping to a Different Address?"  when the billing is filled in, but NOT the shipping.

      <?php if ((!empty($this->cart->BT)) && (empty($this->cart->ST))){ ?>
      <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&virtuemart_user_id[]='.$this->cart->lists['current_id'],$this->useXHTML,$this->useSSL) ?>">
      Shipping to a different address? </a><?php } ?>

Displays "Edit Your Shipping Address" When its already filled in

      <?php if(!empty($this->cart->STaddress['fields'])){ ?>
      <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&virtuemart_user_id[]='.$this->cart->lists['current_id'],$this->useXHTML,$this->useSSL) ?>">
      Edit Your Shipping Address
      </a> <?php }?>
Are these lines to be added or is this a find and replace? Also which files would this be? There are issue with customers not putting in address and trying to put in payment and shipping information. This code will help buyers find their way as VM2 is not direct enough.

I seriously appreciate any and all help!
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

Stonedfury

  • Jr. Member
  • **
  • Posts: 266
    • Stonedfury
  • Skype Name: Stonedfury
  • VirtueMart Version: 2.0.24
Re: Cart Page Fields & Modifications
« Reply #27 on: April 19, 2013, 21:09:55 pm »
Hello again. In addition to my last question. Is is possible to make the checkout button change. One for "Confirm & Save Details" Then after that. "Checkout"? I ask because customers get lost in the loop. "Why did I have to click two time, Why did it not complete after I clicked it? Page just refreshed so I abandoned" <- actual quotes. I cannot make this shit up.
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Cart Page Fields & Modifications
« Reply #28 on: April 19, 2013, 21:42:49 pm »
Stonedfury

go to my website & see how my checkout is done,
 you will see it makes things easier

I use this to include my steps
<?php include("steps.php"); ?>

then I have a php file called steps.php

in the same folder



this is the file
<?php if (empty($this->cart->BT)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT',$this->useXHTML,$this->useSSL) ?>">
      Please Fill Out Your Billing Address
      </a><br/><?php }?>
<?php if (!empty($this->cart->BT)){ ?><img alt="Attention" src="/images/green.png" /> Billing Address Completed<br/><?php }?>

<?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?><span class="redtext bold left10">!</span> <?php $this->select_payment_text='Select Your Payment Method'; echo JHTML::_('link', JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL), $this->select_payment_text,'class="bold details font14 m4"'); ?>  <br/><?php }?>

<?php if ($this->cart->cartData['paymentName'] != 'No payment selected') {?><img alt="Attention" src="/images/green.png" /> Payment Selected <br/><?php }?>
<?php if ((!empty($this->cart->BT)) && (empty($this->cart->ST))){ ?>
      <a class="details bold font14" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&virtuemart_user_id[]='.$this->cart->lists['current_id'],$this->useXHTML,$this->useSSL) ?>">
      Ship to a different address? </a><?php } ?>

<?php if (((!empty($this->cart->BT))&& ($this->cart->cartData['paymentName'] != 'No payment selected') )&& ($this->cart->tosAccepted)){
 echo '<div class="bottom10 border bold center lightcream top10 left10 bblack" style="width:255px;font-size:21px;">';
         echo $this->checkout_link_html;
         $text = JText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU');
         echo '</div>';

}?>



I actually change the text of
COM_VIRTUEMART_ORDER_CONFIRM_MNU

to "Place order now"
I do NOT do development work for hire.

Stonedfury

  • Jr. Member
  • **
  • Posts: 266
    • Stonedfury
  • Skype Name: Stonedfury
  • VirtueMart Version: 2.0.24
Re: Cart Page Fields & Modifications
« Reply #29 on: April 20, 2013, 19:37:17 pm »
Can I please get a link to your website sir?
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.