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

Stonedfury

  • Jr. Member
  • **
  • Posts: 266
    • Stonedfury
  • Skype Name: Stonedfury
  • VirtueMart Version: 2.0.24
Re: Cart Page Fields & Modifications
« Reply #75 on: May 23, 2013, 21:31:41 pm »
in the unmodified file


right before this

<span class="values vm2<?php echo '-' . $item['name'] ?>"><?php echo $this->escape ($item['value']) ?></span>


add this
   <?php if ($item['name']==='WHAT-YOU-WANT-TO-NOT-SHOW' ) {continue;} ?>


You do it both with the billing & shipping.


You sir are awesome. I will check the change on test site. Thank you.
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.

IntrepidClassChicken

  • Beginner
  • *
  • Posts: 47
Re: Cart Page Fields & Modifications
« Reply #76 on: May 27, 2013, 16:18:59 pm »
Hi Folks,

The Cart page definitely needs an overhaul so I am very keen to implement some of these changes.

I am confused on some very basic information and I request to have it be made very simple. Please speak to me like I am 10 years old if that helps. I won't be offended.

Which file am I modifying?
Where is this file located?
Where is the modified file to be saved to?

I am guessing "default.php" in the "/public_html/components/com_virtuemart/views/cart/tmpl" folder???????
Seriously wasted like an hour just to find that file. Still not sure if it is the correct one. I read this whole thread forwards and backwards like three times looking for clues.

What code do I need to delete?
Where do I insert the code you speak of?

I've tried the "<?php include("steps.php"); ?>" code at both the top and the bottom of the above "default.php" file but all that does is put links from the "steps.php" file at the top or the bottom of the existing page. It doesn't actually change the way the rest of the page displays.

Other than any knowledge of PHP, what am I missing?


Also the layout of the columns in the cart is a mess. Which file and/or which bit of code spells out the layout?
It looks like a table is used but I couldn't see anything that looked like a table structure in the above "default.php" file.


Your help is VERY VERY much appreciated.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3025
  • VirtueMart Version: 3.6.3
Re: Cart Page Fields & Modifications
« Reply #77 on: May 28, 2013, 16:34:54 pm »
To create an override

follow these basic instructions :- http://forum.virtuemart.net/index.php?topic=90935.0

Do not just modify the views in the virtuemart folder, as these are likely to get overwritten when implementing an new release.

As for the specifics, you will have to read this post in more detail - If you are new to this, then I would suggest that you seek experienced help, as getting it wrong will screw up your cart.

You are in the correct place for the views - just that the cart is made up of more than one view so not just default.php
regards
A

Joomla 3.9.12
php 7.2

link2monib

  • Beginner
  • *
  • Posts: 1
  • Skype Name: muneeb.elahi
  • VirtueMart Version: 2.0.20a
Re: Cart Page Fields & Modifications
« Reply #78 on: June 14, 2013, 23:01:22 pm »
Hi,

I am new to Virtuemart and seeking some help and tips from senior members on this forum.

My Case - I am using joomla 2.5 with virtuemart 2, and i want to have "Add/Edit billing information" form shown on cart page (checkout page) Rather having a button. I simply do not want my customers to go to another page to fill in their info and route back to cart/checkout page after saving the info.

I do not have login/registration activated on my website as i do not need it. Clients can simply add their desired product to cart and checkout after providing their billing and/or shipping info.

Secondly, how can i eliminate that 2 step checkout (checkout and then confirm order)? this really makes customers confused. Can this be done just in one step? i mean just with checkout out or confirm order button only?

my website is artimmix.com
Many Thanks
Muneeb Elahi

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: Cart Page Fields & Modifications
« Reply #79 on: June 15, 2013, 01:21:54 am »
you need to look for a 1 page checkout plugin, there are a few around
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

IntrepidClassChicken

  • Beginner
  • *
  • Posts: 47
Re: Cart Page Fields & Modifications
« Reply #80 on: June 20, 2013, 07:59:29 am »
How safe would a third party plugin like that be?

Occurs to me that if someone was going to write a trojan bit of code to hijack your order feed, gleaming customer information and possibly even credit card information, this would be the exact kind of application they would install it into!!!

Developers if you are listening.... I strongly urge you to work on the user friendliness of the Cart page as a priority for the next version.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3025
  • VirtueMart Version: 3.6.3
Re: Cart Page Fields & Modifications
« Reply #81 on: June 20, 2013, 09:45:00 am »
So beware of free templates!! and free open source products, hmmmmmmmmmmm  I feel your first point is not so helpful.  Also difficult to hide such a thing in PHP!

However your second point is well made. The checkout is slightly lame and falls well short of some ecommerce packages on the usability front

Those one page checkout guys use lots of java and are constantly getting nagged when it has conflicts - I, for one, have chosen to keep away froma plugin where my checkout process is involved.
regards
A

Joomla 3.9.12
php 7.2

IntrepidClassChicken

  • Beginner
  • *
  • Posts: 47
Re: Cart Page Fields & Modifications
« Reply #82 on: June 20, 2013, 13:12:54 pm »
I am no expert but I imagine there would be a thousand ways to achieve a trojan entry into this open source environment :/

Risk minimisation being the goal here as risk elimination seems to be very difficult.

tmdonovan

  • Beginner
  • *
  • Posts: 27
Re: Cart Page Fields & Modifications
« Reply #83 on: June 20, 2013, 17:00:08 pm »
My client was not happy with the new view-cart page that showed login, address, cart, etc. all on one page.  He wanted a multi-step process, so I tested the view-cart process and learned that if you simply click the CheckOut button on the view-cart page (with no customer login, BT or ST address, no payment or shipping method selected), VM will "walk" you through a few forms to gather the necessary information.  Only when all necessary info is entered, the CheckOut button changes to Confirm Purchase.  I looked into the cart's php code and learned this is controlled by the php variable $this->checkout_task.  This variable is set to "confirm" only when all necessary info has been entered.  So, I did a template override for the cart, and modified default.php and default_pricelist.php to display things like login, address, coupon code, payment/shipping ONLY WHEN $this->checkout_task = "confirm".  This works very nicely, my client likes it and because it's all done in a template override, it won't be overwritten when new VM 2 releases are installed.

Thank you PRO, I've used your posts to solve this and several other VM2 problems.

kathcatch

  • Beginner
  • *
  • Posts: 7
Re: Cart Page Fields & Modifications
« Reply #84 on: July 31, 2013, 14:10:33 pm »
Hi everyone,
I'm making some slight modifications to my cart page (default_pricelist.php). I would like to display each of the product's availability (ie. whats displayed on the product page).

I can't seem to get it to work - do i need to call it in differently?
I've tried a number of things like:
<strong>Delivery timeframe:</strong> <?php echo $prow->product_availability ?>
<strong>Delivery timeframe:</strong><?php echo $this->product->product_availability; ?>

I know this will probably just spit out 24_hours.jpg etc, but its a start, and I can't seem to get it to even do that. It just can't seem to read it.

Can the cart template only read certain product elements?

Currently running: Joomla 2.5.9 and VM 2.0.20b

Any help will be much appreciated.

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2657
Re: Cart Page Fields & Modifications
« Reply #85 on: July 31, 2013, 15:05:55 pm »
Code: [Select]
echo $product->product_availability;?

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10377
  • VirtueMart Version: 3+
Re: Cart Page Fields & Modifications
« Reply #86 on: July 31, 2013, 19:54:07 pm »
NO, product_availability is not in the array

I have talked to milbo about this, it should be.

i think he plans to add it
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

Poseidone68

  • Beginner
  • *
  • Posts: 1
Re: Cart Page Fields & Modifications
« Reply #87 on: September 16, 2013, 12:43:44 pm »
My client was not happy with the new view-cart page that showed login, address, cart, etc. all on one page.  He wanted a multi-step process, so I tested the view-cart process and learned that if you simply click the CheckOut button on the view-cart page (with no customer login, BT or ST address, no payment or shipping method selected), VM will "walk" you through a few forms to gather the necessary information.  Only when all necessary info is entered, the CheckOut button changes to Confirm Purchase.  I looked into the cart's php code and learned this is controlled by the php variable $this->checkout_task.  This variable is set to "confirm" only when all necessary info has been entered.  So, I did a template override for the cart, and modified default.php and default_pricelist.php to display things like login, address, coupon code, payment/shipping ONLY WHEN $this->checkout_task = "confirm".  This works very nicely, my client likes it and because it's all done in a template override, it won't be overwritten when new VM 2 releases are installed.

Thank you PRO, I've used your posts to solve this and several other VM2 problems.
I need to split the process too. I was looking to manage it using the checkout_task variable, but as soon as it enter in the default.php page the variable is already set to confirm (in the configuration panel the "one page checkout" option is unchecked..)
I'm not very found in php, i'm helping a friend with a small shop. So, how can i make it work? Is it possible to have and example of a default.php to help me understand how to customize it?

Thanks

turoco

  • Beginner
  • *
  • Posts: 15
Re: Cart Page Fields & Modifications
« Reply #88 on: September 20, 2013, 10:04:36 am »
My client was not happy with the new view-cart page that showed login, address, cart, etc. all on one page.  He wanted a multi-step process, so I tested the view-cart process and learned that if you simply click the CheckOut button on the view-cart page (with no customer login, BT or ST address, no payment or shipping method selected), VM will "walk" you through a few forms to gather the necessary information.  Only when all necessary info is entered, the CheckOut button changes to Confirm Purchase.  I looked into the cart's php code and learned this is controlled by the php variable $this->checkout_task.  This variable is set to "confirm" only when all necessary info has been entered.  So, I did a template override for the cart, and modified default.php and default_pricelist.php to display things like login, address, coupon code, payment/shipping ONLY WHEN $this->checkout_task = "confirm".  This works very nicely, my client likes it and because it's all done in a template override, it won't be overwritten when new VM 2 releases are installed.

Thank you PRO, I've used your posts to solve this and several other VM2 problems.
I need to split the process too. I was looking to manage it using the checkout_task variable, but as soon as it enter in the default.php page the variable is already set to confirm (in the configuration panel the "one page checkout" option is unchecked..)
I'm not very found in php, i'm helping a friend with a small shop. So, how can i make it work? Is it possible to have and example of a default.php to help me understand how to customize it?

Thanks

@tmdonovan, yes could you share your files and let us buy you a beer for the trouble. This standard VM checkout aint working for nobody.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3025
  • VirtueMart Version: 3.6.3
Re: Cart Page Fields & Modifications
« Reply #89 on: October 08, 2013, 18:30:15 pm »
Hide the shipping selection until address is completed vm2.0.24

I am still working on the cart display.

With the new OPC option in the cart layout, All the available Shipping rates that your cart qualifies for are displayed.

This is fantastic news, unless you have multiple countries or zones etc that require an address to be completed, as the rates get displayed before entry of an address is finished.

So how to get the shipping rates hidden until address is complete - so simple!

Just create an override for com_virtuemart/views/cart/tmpl/cart/default_pricelist.php

At line 340 you should see where the shipping rates start:-

Code: [Select]
<tr class="sectiontableentry1" valign="top">
<?php if (!$this->cart->automaticSelectedShipment) { ?>


Just add an if if (!empty($this->cart->BT)) statement to surround the delivery code and the delivery option will not display until address details are completed

Here is the replacement code:-

Code: [Select]

<?php 
if (!empty($this->cart->BT)){
?>

<tr class="sectiontableentry1" valign="top">
<?php 
 if(!$this->cart->automaticSelectedShipment) { ?>


<?php /* <td colspan="2" align="right"><?php echo JText::_('COM_VIRTUEMART_ORDER_PRINT_SHIPPING'); ?> </td> */ ?>
<td colspan="4" align="right">
<?php echo $this->cart->cartData['shipmentName']; ?>
<br/>
<?php



if (!empty($this->layoutName) && $this->layoutName == 'default' && !$this->cart->automaticSelectedShipment) {
if (VmConfig::get('oncheckout_opc'0)) {
$previouslayout $this->setLayout('select');
echo $this->loadTemplate('shipment');
$this->setLayout($previouslayout);
} else {
echo JHTML::_('link'JRoute::_('index.php?view=cart&task=edit_shipment'$this->useXHTML$this->useSSL), $this->select_shipment_text'class=""');
}
} else {
echo JText::('COM_VIRTUEMART_CART_SHIPPING');
}?>

</td>
<?php
} else {
?>

<td colspan="4" align="right">
<?php echo $this->cart->cartData['shipmentName']; ?>
</td>
<?php ?>

<?php if (VmConfig::get ('show_tax')) { ?>
<td align="right"><?php echo "<span  class='priceColor2'>" $this->currencyDisplay->createPriceDiv ('shipmentTax'''$this->cart->pricesUnformatted['shipmentTax'], FALSE) . "</span>"?> </td>
<?php ?>
<td align="right"><?php if($this->cart->pricesUnformatted['salesPriceShipment'] < 0) echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment'''$this->cart->pricesUnformatted['salesPriceShipment'], FALSE); ?></td>
<td align="right"><?php echo $this->currencyDisplay->createPriceDiv ('salesPriceShipment'''$this->cart->pricesUnformatted['salesPriceShipment'], FALSE); ?> </td>

</tr>
<?php
}
?>





You caould always add a line to display that "delivery options will be shown when address is complete" if you want to help out even further and hide this when they have done the address part.
I think I might do this myself  :)

regards
A

Joomla 3.9.12
php 7.2