Altering Checkout Layout and Functionality

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #61321

We are using HikaShop Starter. The site can be seen at www.skillbuildersbooks.com/

There are several things we would like to be able to alter about the checkout process, but are not sure how to do:

1. Can the "Continue Shopping" and "Next" buttons be moved to the top of the cart, above the product listing, rather than at the very bottom beneath the registration and shipping/payment info?

2. Can the text of the "Next" button be altered? I tried adjusting the entry in the language file, but the change did not affect the button.

3. Is there a way to disable the sending of the order creation email? Since we are using PayPal Basic, the email gets created the minute the user leaves the cart to pay, which can be problematic if they do not actually finish the order. I found a previous forum question that indicated a database field to edit, and a PHP file to alter, but neither of those items matched up with what I saw when I poked around (it was an old question, so the cart may be configured differently now). Ideally, the payment confirmation email would be sent, and the shipping email (if applicable).

4. I was able to get the address to transmit to PayPal, minus the Address Line 2 field. That field was broken and had to be turned off in order to allow registration and addresses to work at all (I learned this from another recent reply by Nicholas), and the one I created to replace it does not seem to be communicating with PayPal. Is there a way to fix that?

5. Is there any way to have HikaShop pull the name for the address from the Joomla registration name field? Forcing people to enter their name twice on the registration page is a bit odd.

6. Can the address management section of the cart front-end be simplified so that the user is only able to enter one address for billing and potentially one other for shipping, without showing all of the available addresses for selection under each option? This store will not have much repeat traffic or purchases, so keeping it simple is a priority.

Thank you again for the help!

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 2 months ago #61410

Hi,

1. You can change that by moving the code

if($this->nextButton){
			echo $this->cart->displayButton(JText::_('HIKA_NEXT'),'next',$this->params,hikashop_completeLink('checkout&task=step&step='.($this->step+1)),'if(hikashopCheckChangeForm(\'order\',\'hikashop_checkout_form\')){ if(hikashopCheckMethods()){ document.getElementById(\'hikashop_validate\').value=1; document.forms[\'hikashop_checkout_form\'].submit();}} return false;','id="hikashop_checkout_next_button"');
		}
		?>
		</form>
		<?php
		if($this->continueShopping){
			if(strpos($this->continueShopping,'Itemid')===false){
				if(strpos($this->continueShopping,'index.php?')!==false){
					$this->continueShopping.=$url_itemid;
				}
			}
			if(!preg_match('#^https?://#',$this->continueShopping)) $this->continueShopping = JURI::base().ltrim($this->continueShopping,'/');
			echo $this->cart->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,JRoute::_($this->continueShopping),'window.location=\''.JRoute::_($this->continueShopping).'\';return false;','id="hikashop_checkout_shopping_button"');
		}
after
$url_itemid='';
	if(!empty($Itemid)){
		$url_itemid='&Itemid='.$Itemid;
	}
in the file "step" of the view "checkout" via the menu Display->Views

2. That can be done with a translation override:
www.hikashop.com/en/download/languages.html#modify
You can also potentially modify the code from point 1.

3. The option in the database is still the same as the first release of HikaShop. But if you want to make it easy on you, you can simply disable the email on the menu System->Emails with the Business edition.

4. Enable that field and run the query below in phpMyAdmin after replacing in it jos_ by your table prefix and it will work automatically :
ALTER TABLE `jos_hikashop_address` ADD `address_street2` VARCHAR( 255 ) NOT NULL DEFAULT '' AFTER `address_street`;

5. No but the opposite is possible:
www.hikashop.com/en/forum/4-how-to/59772...ng-registration.html

6. Just add that line after the first <?php tag of the address_view file of the "checkout" view via the menu Display->Views:
if(!empty($this->addresses)) $this->addresses = array(reset($this->addresses));

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

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #61415

Thank you so much for the prompt reply, Nicolas. I really appreciate it.

1. When I moved the code, the "Continue Shopping" button appeared in the new place, but the "Next" button vanished. I reverted it to the original code for now.

2. I was changing the wrong entry in the language file (Next instead of HIKA_NEXT) - this works now.

3. I did not see the entry that needed to be edited in the database to disable the emails. Do I create it, in that case? Ideally, we only want the customer AND client to receive order emails when payment has been confirmed. So, if I can disable both order creation notifications, that would be great. That way the client wouldn't be pestered by order notifications that don't result in sales, and the customer won't be confused by confirmation notices if they did not actually finish their order.

4. I tried this, but I got the error: #1060 - Duplicate column name 'address_street2'. The entry was already in the database, it just wasn't working. I had created my own address 2 item, but it had a different name and did not function as well as the core item.

5. This worked perfectly.

6. When I entered that code, it only showed one address each for shipping and billing, but it was always the same one (both columns were updated and the old address was hidden). Perhaps I was not quite clear on that. Is it possible to specify one shipping and one billing address, each different if necessary, but not have the cart show the list of other addresses under each heading?

Thank you again for your help, Nicolas!

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

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #61428

Our client raised another question today - one that I am not sure HikaShop can handle.

The client is providing free shipping for all physical orders placed in the continental United States. However, they also offer digital downloads that can be sold to anyone. Currently we have the zones in HikaShop set up so that purchases cannot be made from any location outside the US, and the customer is instructed to contact the owner directly for these orders.

Would it be possible to configure HikaShop so that the digital items can be ordered worldwide, but any physical items in the cart will be withheld from the invoice (but retained in the order listing to inform the store owner of the intent to purchase)? I am not sure I'm explaining it well, as it's a difficult concept to pin down. I know Zones can handle exclusions, but it seems those would block the order entirely unless the customer manually removed the offending item from the cart - is that correct?

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 2 months ago #61510

Hi,

1. You also need to change :
if($this->nextButton){

by:
if(true){

And that will display the next button.

3. Yes, you can create it if you don't find it.

4. If the column is there, it probably means that you updated in the mean time which fixed the issue with the address_street2 field. You should try to use it.
If you want to use another field you can change address_street2 to the column name of your field in the file plugins/hikashoppayment/paypal/paypal.php

6. Mmm, that will be more complex then.
You need to revert that modification and change instead the line:
<tr class="<?php echo "row$k"; ?>">

to:
<tr class="<?php echo "row$k"; ?>" <?php echo @$style; ?>>

and add the line:
else{$style=' style="display:none"';}
before the line:
if($this->config->get('auto_submit_methods',1)&&empty($checked)){

in the same file

7. Indeed you can block the order altogether with the zone restriction. But you can't have the user pay for only some of the products of the order and not for the rest which would be processed later on manually. So I don't have a solution for that.

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

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #61547

Thank you for your last reply.

1. This worked just fine now. Is there any way to insert a bit of space between the buttons and the top of the cart table? It's currently flush. I tried adding margins to class-specific elements in the style sheet, but none of my additions seemed to do anything.

3. I will need to go in and try the database edits and see if that works. Is there a separate entry for the order creation email that is sent to the administrator? Or are those the same flag?

4. I edited the PayPal php file to get my field to work. The existing address_street2 field is there, but it doesn't do anything even when enabled (it actually prevents the registration form from storing the address at all - it appears to be broken in some way). One other item I noticed here is that my State field is not transmitting to PayPal (I have it set to Zones and displaying only US states). Any ideas there? Finally, is there a way to get custom non-core fields to show up in the preview address display under the User view? All the info is there, but only the core elements are displayed unless you go to the order or hit edit under the user addresses.

6. I tried what you suggested, but what it did was hide the Billing Address list entirely if I edited or created a new address under shipping. What the client really wants (and I am not sure if this is possible) is for there to be one address under billing (the one you enter during signup), and the option to create one more for shipping. So, if they are not the same, the cart would display one address under billing and another under shipping, with no radio button list to select between multiple addresses on each side.

7. Thank you for explaining this.

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 2 months ago #61627

1. Why not simply add a <br/> tag after that code ?

3. For the admin email, it's order_admin_notification and not order_creation_notification

4. If you removed the country field, that would explain why that is happening.
You can display the non core fields by editing the files "address_template" via the menu Display->Views and adding the corresponding tag.

6. Mmm. I don't see why that would be the case. The code modification sounds about right.
Note that we are already way past normal support here.
It is certainly possible to do with some code modification but we would need to test all that with traces to understand why the modification proposed didn't work etc.

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

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #61756

1. Thanks for the tip. I inserted echo "<br/>"; into the if statement that renders the Continue Shopping button, and that did the trick.

3. Again, thank you. I will give that a try when I have time to poke around in the database and review the older threads where you provided that fix.

4. I didn't remove the country field - I just disabled all country zones other than the US, and all state zones other than the US continental states. I have my custom fields inserted into the view as specified.

6. EDIT: This went away now. I will leave it for reference. I am experiencing a very strange error here now. When I go to edit or create a new address, the entire site appears in the lightbox pop-up when I click OK to submit the form. I would be happy just having the functionality back to normal, but I am not sure what went wrong now.

I understand that these issues go beyond basic support, and I truly appreciate your help, Nicolas. If you can help me resolve the last item (the address pop-up issue) that just started happening recently, I will see if we can work with things the way they are for the rest of the items.

Thank you again!

Last edit: 12 years 2 months ago by pulsemarketing.

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 2 months ago #61904

4. Please change the line:
$vars["state"]=@$order->cart->$address_type->address_state->zone_code_2;

to:
$vars["state"]=@$order->cart->$address_type->address_state->zone_code_3;

in the file plugins/hikashoppayment/paypal/paypal.php and that should fix the problem.

6. The system uses view files overrides. So that way you never loose the original file. On the listing of the view files, you have a column "remove customization" with a trash can for the view files that you edited. Just click on it and it will revert back to the default one. That's a great way to try different things without being afraid to do something wrong and not being able to roll back the modifications.

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

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #62257

Nicolas,

Thank you again. #4 worked just fine, and the database edit to disable the email worked as well.

I still am not able to get any of my custom fields to show up in the address preview under the User profile (see attachment - I have several fields that are not showing up until I hit Edit, despite their being in the view listing).

Attachments:

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 2 months ago #62259

That view file is in the backend. So you need to edit the address_template of the order view for your backend template.

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

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #62265

Oddly enough, editing that view doesn't seem to be doing the trick. Other than that, I think everything is working correctly.

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 2 months ago #62379

That's because you must be editing the file for the wrong template. Please do a screenshot of the view listing after filtering by "address_template".

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

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #62384

Nicolas, you are absolutely right there - I was editing my front-end template's version of the back-end view. When I edited Joomla's BlueStork admin template's view it worked as expected. Thank you.

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

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #64738

Nicolas,

We are having a relatively minor technical glitch that I had not noticed until now, and I wanted to outline it in this thread, rather than clutter the forum with another new thread. I hope that's okay.

The issue is with regard to the "Use the same address as for billing" checkbox during the checkout process. This checkbox functions as expected in the latest versions of Chrome, Safari, and Firefox, but is not working correctly in Internet Explorer 9. Instead, the checkbox does nothing when unchecked (it should be revealing the address and the edit/new buttons). When it is rechecked, the second address and buttons vanish - it appears the checkbox is operating in reverse. I am attaching two screenshots illustrating the issue in action.

Do you have any idea how this might be fixed?

Attachments:

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 2 months ago #64741

Such problem can happen with some templates which override the display of the checkboxes and don't do it properly:
www.hikashop.com/ja/forum/4-how-to/5882-...hipping-address.html

The following user(s) said Thank You: pulsemarketing

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

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #64747

Thank you, Nicolas. I followed one of the tips in that thread (disabling input styling in Gantry for the page in question) and it appears to have done the trick.

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

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #64749

I have one additional question that I am not even sure can be answered. It's a bit difficult to articulate, but I will try (and truly appreciate your feedback):

Our client would like the Address 1 and Address 2 fields to be labeled either "Billing Address 1" or "Shipping Address 1" depending on the context. So, when someone registers, the client would like the address fields to say "Billing Address 1 / Billing Address 2", since that address is auto-applied as the billing address; but when someone adds a new shipping address, they would like the fields to say "Shipping Address 1 / Shipping Address 2". As the label defined in custom fields is used for any address entered, this does not appear to be possible.

What are your thoughts?

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

  • Posts: 82818
  • Thank you received: 13362
  • MODERATOR
12 years 2 months ago #64752

That's indeed not possible.

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

  • Posts: 31
  • Thank you received: 0
12 years 2 months ago #64753

Thank you for getting back to me so quickly. That is what I thought.

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

Time to create page: 0.096 seconds
Powered by Kunena Forum