Image Display - Payment and Shipping types
Posted: 10 Aug 2017, 01:11
I noticed that the image you can save with each Payment and Shipping type is not displayed during checkout. I updated a few files to make this happen.
I made two changes to the library "administrator/components/com_phocacart/libraries/phocacart/cart/cart.php": -
For Payments, update the addPaymentCosts function, around line # 691, adding the following line:-
For Shipping, update the addShippingCosts function, around line # 657, adding the following line:-
For the front-end view, I made changes to two files
For Payments, I edited the "components/com_phocacart/views/checkout/tmpl/default_payment.php" file: -
View mode - around line # 35: -
Edit mode - around line # 95: -
(Note: Split into two lines for easier reading)
For Shipping, I edited the "components/com_phocacart/views/checkout/tmpl/default_shipping.php" file: -
View mode - around line # 72: -
Edit mode - around line # 132: -
(Note: Split into two lines for easier reading)
Something for the next release?
I made two changes to the library "administrator/components/com_phocacart/libraries/phocacart/cart/cart.php": -
For Payments, update the addPaymentCosts function, around line # 691, adding the following line:-
Code: Select all
$this->payment['costs']['image'] = $pI->image;
Code: Select all
$this->shipping['costs']['image'] = $sI->image;
For Payments, I edited the "components/com_phocacart/views/checkout/tmpl/default_payment.php" file: -
View mode - around line # 35: -
Code: Select all
echo '<div class="col-sm-8 col-md-8 "><img src="'. $this->t['paymentmethod']['image'] .'" style="width: 90px; padding-right: 20px; align: left;"></img>'.$this->t['paymentmethod']['title'];
Code: Select all
echo '<label><input type="radio" name="phpaymentopt" id="phpaymentopt'.$v->id.'" value="'.$v->id.'" '.$checked;
echo '><img src="'.$v->image.'" style="width: 90px; padding-right: 20px; align: left;"></img>'.$v->title.'</label>';
For Shipping, I edited the "components/com_phocacart/views/checkout/tmpl/default_shipping.php" file: -
View mode - around line # 72: -
Code: Select all
echo '<div class="col-sm-8 col-md-8 "><img src="'. $this->t['shippingmethod']['image'] .'" style="width: 90px; padding-right: 20px; align: left;"></img>'.$this->t['shippingmethod']['title'];
Code: Select all
echo '<label><input type="radio" name="phshippingopt" id="phshippingopt'.$v->id.'" value="'.$v->id.'" '.$checked;
echo '><img src="'.$v->image.'" style="width: 90px; padding-right: 20px; align: left;"></img>'.$v->title.'</label>';
Something for the next release?