Page 4 of 5

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Mon Nov 22, 2010 2:19 pm
by jeff11214
I tried it on a different PC and it is working. I have no idea why this is happening... very strange.

Thanks

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Mon Nov 22, 2010 6:45 pm
by jeff11214
Now using Firefox browser and here are some issues I hope you can help with:

On the "Complete your order" page (checkout.php)
can the "Order Now!" button go directly to PayPal and skip the thank you page (thankyou.php)?
-If not, can I change the value/label "Order Now!" button to show "Continue".

On the "Order completed" page (thankyou.php)
it shows "Your order has been successfully placed! A confirmation email has been sent to your email address.
Please proceed to payment so we can process your Order."
-But the PayPal button form is not showing. (nothing is showing)

On the "Customer Information" page (customer.php)
It looks like the only required field is the E-mail field and I would like to make all fields required.
-Can I simply change this in the editbox properties validate tab?

When the Order is completed an e-mail is sent to the customer showing the order details.
-Can this include the Paypal link to pay for the item?

In Firefox, some things don't display properly:
on the Customer Information page (customer.php), the "Previous" button shows the word "Page" below it.

And then on the next page "Complete your order" (checkout.php) same problem with the buttons:
"Previous" button shows the word "Page" below the button and the "Cancel" button shows the word "Order!" below the button.

Thanks for your help.

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Mon Nov 22, 2010 6:57 pm
by Navaldesign
jeff11214 wrote:Now using Firefox browser and here are some issues I hope you can help with:

On the Complete your order page (checkout.php)
can the "Order Now!" button go directly to PayPal and skip the thank you page (thankyou.php)?
-If not, can I change the value/label "Order Now!" button to show "Continue".
Not at the moment. I will upload an updated version in a few days, where normal submit buttons will be replaced by advanced buttons (and the internal php code modified) so it will be possible to change the buttons wording.
On the Order completed page (thankyou.php)
it shows "Your order has been successfully placed! A confirmation email has been sent to your email address.
Please proceed to payment so we can process your Order."
-But the PayPal button form is not showing. (nothing is showing)
Did you modify the code ?
Or
Did you remove the payment method dropdown from the previous page ? If yes, no payment method is passed to the "thankyou" page and therefore the script doesn't display the PayPal button.
You will need to use the specific PayPal only pages that come with the zip and rename them (removing the "1" from the end of the page name.
On the "Customer Information" page (customer.php)
It looks like the only required field is the E-mail field and I would like to make all fields required.
-Can I simply change this in the editbox properties validate tab?
Yes.
When the Order is completed an e-mail is sent to the customer showing the order details.
-Can this include the Paypal link to pay for the item?
No. You would need to recreate the email code, to send HTML email with the same code as the PayPal button, otherwise the PayPal details (email address, Order ID, Amount, etc) can NOT be passed over to PayPal.
In Firefox, some things don't display properly:
on the Customer Information page (customer.php), the "Previous" button shows the word "Page" below it.
Just make the button larger in WB and publish again.
And then on the next page "Checkout" (checkout.php) same problem with the buttons:
"Previous" button shows the word "Page" below the button and the "Cancel" button shows the word "Order!" below the button.
Same as above.

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Mon Nov 22, 2010 8:14 pm
by jeff11214
On the Order completed page (thankyou.php)
it shows "Your order has been successfully placed! A confirmation email has been sent to your email address.
Please proceed to payment so we can process your Order."
-But the PayPal button form is not showing. (nothing is showing)
Did you modify the code ?
Or
Did you remove the payment method dropdown from the previous page ? If yes, no payment method is passed to the "thankyou" page and therefore the script doesn't display the PayPal button.
You will need to use the specific PayPal only pages that come with the zip and rename them (removing the "1" from the end of the page name.
On the previous page I did remove payment options which I see caused the problem. I'm now using the PayPal only pages that were included in the zip and that worked perfectly! Thank you!

Now when I click the "PayPal click here to pay" button:
-the PayPal page does not show an option to pay without a PayPal account. I don't want my customers to feel obligated to open a PayPal account.
-Am I missing something?

When the Order is completed an e-mail is sent to the customer showing the order details.
-Can this include the Paypal link to pay for the item?
No. You would need to recreate the email code, to send HTML email with the same code as the PayPal button, otherwise the PayPal details (email address, Order ID, Amount, etc) can NOT be passed over to PayPal.
Is this really difficult? Would you be able to give more information on how to do this? I think others on this site would have an interest in this as well.

Thanks for your quick response!

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Mon Nov 22, 2010 8:26 pm
by Navaldesign
Payment through credit card without a PayPal account is an option that you set in your PayPal account, not in the cart. Set the "PayPal account Optional?" to yes.

HTML email: yes, it is rather complicated, because this is not a static mail, it is created on the fly depending on customer info and order info. The php code loops among the products to create the order details. You need to heavily modify the code.

I have created such a routine for a paying customer and it has taken me hours to create, finetune and test.

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Mon Nov 22, 2010 9:34 pm
by jeff11214
Thank you for your help. It's all coming together now.

May I make a suggestion: Can you include a 2nd error page?

On the Cart page, if an incorrect discount code is entered the Error page opens and you have a link to go back to the cart page which is perfect.

On the next screen, Customer information page, if you click continue and have an incorrect or missing E-mail then you can't go directly back to the Customer Information page. You have to first go to the cart page and continue from there.

I added a link on the error page to go back to the Customer Information page which works fine, but the problem is that link will also show if on the cart page an incorrect discount code is entered. Customer should not see the new link to go to Customer Information page at that point.

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Mon Nov 22, 2010 10:03 pm
by Navaldesign
I understand your requests, however, this is a free script and as such it is delivered AS IS.

I can not afford the time or the efforts required to make such amendments. I will take all users comments into account when / if I make an update to the script.

All the issues you are mentioning are dealt with in my Pro cart, which, however, is a commercial (paid for) script.

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Mon Nov 22, 2010 10:10 pm
by jeff11214
I understand and I do appreciate all you have done.

Thanks!

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Wed Nov 24, 2010 7:00 am
by Navaldesign
In the "cart" page.

Double click the HTML box that displays the cart, find the reference lines and add the new code after them.

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Fri Nov 26, 2010 5:59 pm
by jeff11214
I'm in the final stages of going Live with my webshop2 cart. If I go through an order on my site I finally click the PayPal button and the next page displays "You cannot pay the seller through un-encrypted buttons".

I see my PayPal profile option to "Block Non-encrypted Website Payment:" is set to "On" which is why I'm getting that message. I do realize that it should work if I set this option to 'Off".

PayPal states:
Using encryption enhances the security of website payments by decreasing the possibility that a 3rd party could manipulate the data in your button code. If you plan on only using encrypted buttons you can block payments from non-encrypted ones.

My question is:
Should I be concerned that the PayPal button is not encrypted and can I change it so it is encrypted?

Thank you. And, I love the cart.. it's awesome!

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Fri Nov 26, 2010 6:21 pm
by Navaldesign
No, you should not be concerned at all, because the thing is really simple: If the payment is not as it should, you simply don't ship the goods.

There COULD BE a concern if you were selling downloadable products and IF your automatic download script didn't perform the necessary verifications before allowing download.

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Fri Nov 26, 2010 6:43 pm
by jeff11214
But, can the customers information (name,address,phone number) be 'stolen' if sent via un-encrypted button?

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Fri Nov 26, 2010 6:55 pm
by Navaldesign
Eveything can be stolen, but it is HIGHLY improbable because comunication with PayPal is through SSL.
Please also note that:

1. Customer details can NOT be sent through an encrypted button created on PayPal's site.
2. Webshop plus sends the customer details to PayPal to avoid the customer needing to re-type them.
If you use an encrypted button, he will have to type his details again.
3. If you don't mind them doing so, simply modify the HTML box code so that the UN-encrypted button of Webshop Plus will not send them anyway.

PayPal's comments on unencrypted buttons do NOT regard the customer details security, but your own, as all product details are stored on PayPal' server (and thus they can not be altered).

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Fri Nov 26, 2010 7:37 pm
by jeff11214
Thanks for the detailed explanation on Security. I just wanted to make sure I setup my part as a merchant correctly.

Regarding the Order Number:
In the Scipt Details of the Admin login, I changed the Order Start Number, but the order when placed still shows the default incremented by 1 which started at 100. After reading the entire thread, I also changed the "thankyou.php" start of page code ($order_start = "100";) to what I want, but that didn't change anything. Still shows the incremental by 1 number from 100
-If I can't make this my own order start number it's not the end of the world.

After the PayPal button is clicked, the PayPal page shows the order summary.
The description shows the company name and order number (which looks good).
Below that shows "item number: 111", where 111 is actually the order number. I realize this is PayPal's terminology, but I figured I would ask if you think this can be changed to show the word "order" instead of 'item'. I don't want to confuse the customer.

I'll try not to ask any more question after this :)
Thanks for all your help!!!!

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Fri Nov 26, 2010 8:15 pm
by Navaldesign
If the Order nr doesn't change, probably the script can't write the order number to the file that keeps the numbering. This is most probably a permissions issue. Normally the file "order_nr.php" should have permissions set to 644, but you can also try 777.

I don't think that there is a way to change the wording in PayPal.

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Fri Nov 26, 2010 8:58 pm
by jeff11214
Permissions already set to 644 with the following checked:

Owner- Read and Write is checked (execute unchecked)
Group- Read is checked (write and execute unchecked)
Public- Read is checked (write and execute unchecked)

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Fri Nov 26, 2010 9:03 pm
by Navaldesign
It should work. If it doesn't, check with your hosting company. However, try also 777.

It might sound weird, but I have met cases where FTP displayed different permissions than the correct ones. If you have CPanel and File Manager, check it through those.

Re:

Posted: Sat Nov 27, 2010 9:56 pm
by jeff11214
I just tested out the code below. Only the first name and last name are passed to PayPal. The other fields like Address, City, State and Zip Code do not get passed to PayPal. Any idea why that is? It would be nice if all info is passed to PayPal.
uniformality wrote:I have modified the Paypal button on the 'thank you' page so thatname and address gets passed to paypal so the customer doesnt have to re-enter it. The new code is

<?php
// display PayPal checkout?

$form = '
<form target="PayPal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_ext-enter">
<input type="hidden" name="redirect_cmd" value="_xclick">
<input type="hidden" name="business" value="'.$paypal_email.'">
<input type="hidden" name="item_name" value="'.$dbts_title.' Order '.$orderid.'">
<input type="hidden" name="item_number" value="'.$orderid.'">
<input type="hidden" name="amount" value="'.number_format($_SESSION['nettotal'], 2).'">
<input type="hidden" name="currency_code" value="'.$currency.'">
<input type="hidden" name="shipping" value="'.$_SESSION['shipping1'].'">
<input type="hidden" name="handling" value="'.$_SESSION['handling'].'">
<input type="hidden" name="return" value="'.$paypal_thankyoupage.'">
<input type="hidden" name="cancel_return" value="'.$paypal_cancelpage.'">
<input type="hidden" name="undefined_quantity" value="0">
<input type="hidden" name="receiver_email" value="'.$paypal_email.'">
<input type="hidden" name="no_shipping" value="'.$require_address.'">
<input type="hidden" name="no_note" value="'.$allow_message.'">
<input type="hidden" name="first_name" value="'.$_SESSION['firstname'].'">
<input type="hidden" name="last_name" value="'.$_SESSION['lastname'].'">
<input type="hidden" name="address1" value="'.$_SESSION['address'].'">
<input type="hidden" name="address2" value="'.$_SESSION['address2'].'">
<input type="hidden" name="city" value="'.$_SESSION['city'].'">
<input type="hidden" name="state" value="'.$_SESSION['state'].'">
<input type="hidden" name="zip" value="'.$_SESSION['zip'].'">
<input type="image" name="submit" src="http://images.paypal.com/images/x-click-but6.gif" alt="Make payments with PayPal, it\'s fast, free, and secure!">
</form>
';
echo $form;

?>

I found it better not to pass the email address as Paypal assumes your customer has a paypal account and doesn't dispay the name and address data but here it is incase anyone needs it

<input type="hidden" name="email" value="'.$_SESSION['email'].'">

Regards
Paul

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Sat Nov 27, 2010 11:34 pm
by Navaldesign
It should work (works fine for me).

Have a look at https://www.paypal.com/cgi-bin/webscr?c ... te_outside

Re: Modified version of the WB6 Webshop!! Webshop_plus

Posted: Sun Nov 28, 2010 2:30 pm
by jeff11214
It does work for me. I'm having an issue with 1 of my PC's where the cart.php doesn't show in IE8 and when using FF the address wasn't getting passed on. I placed an order from a different PC and eveything is working like it should.

Any idea when you will be posting the update for the Advanced buttons?

Thanks George!

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Thu Dec 23, 2010 11:40 pm
by Navaldesign
@ wacmaster: if you click on the View Cart, you will see:

Sub Total, €: 29.95
Taxes, €: 5.99
Discount, €: 0.00
Net Total, €: 35.94
Shipping, €: 8.00
Grand Total, €: 43.94

Which explains the amount.

Please note that the cart content appearing like this, is an extra that I have built in the demo but it is NOT included in the script you can download.

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Fri Dec 24, 2010 6:09 am
by Navaldesign
Yes, you must upload the files on the server, but first, you need to READ the instructions. Everything is already included in the manual.

There is no meaning in asking questions online if you have all necessary instructions in the manual. Just open the Webshop Plus manual and read it please.

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Mon Jan 17, 2011 8:23 pm
by Patrik iden
HI, i cant find Swedish lang in admin?
I get a blank page when i click add to cart?

link: http://test3.fcab.se/webshop2/cart

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Mon Jan 17, 2011 8:56 pm
by Navaldesign
Patrik iden wrote:HI, i cant find Swedish lang in admin?
I get a blank page when i click add to cart?

link: http://test3.fcab.se/webshop2/cart
1. What do you mean "Swedish Language" ??

2. Did you setup the cart, through the Admin area ? Especially the Shipping Areas ?

If not, the cart will not work.

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Tue Jan 18, 2011 11:02 am
by Patrik iden
Swedish lang in: Administration login details

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Tue Jan 18, 2011 3:10 pm
by Navaldesign
I still don't understand what you mean.

There is no language selection in the Admin area, so pls clarify what you mean.

IF you mean how to transform messages, titles etc in Swedish, pls click on "Script Details" and provide (in the fields) the Swedish translation of the messages / labels

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Tue Jan 18, 2011 6:32 pm
by Navaldesign
The cart page will be blank until you set the shipping areas : -> Admin Area -> Shipping Areas

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Tue Jan 18, 2011 9:26 pm
by Patrik iden
Hi, i have all the shipping info set to no shipping.


i will try to reinstall it.

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Wed Feb 02, 2011 1:29 pm
by kevinp
Hi Naval

I have a customer who wishes to produce a printable invoice as well as the confirmation emails. I was looking at the script and the mails seem to be controlled from the 'thankyou' page so this leads me to think that I could simply alter the 'function SendEmail' section to send the merchant email in HTML format (in the form of an invoice). But I just want to check the solution below.

Would it be possible to tweak the form on the Thankyou page and include the form processor to add the details to a database that can then be used to print invoices. Looks possible but not sure if the two code sets will interact together.

I'm going to try it out this evening and just wondered if you could see any obvious problems I've missed.

I've also heard a lot about your Pro cart version and wondered if this is a feature available within it. It may be worth sugesting this route to the client.

Cheers

Kevinp

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Wed Feb 02, 2011 2:38 pm
by Navaldesign
kevinp wrote:Hi Naval

I have a customer who wishes to produce a printable invoice as well as the confirmation emails. I was looking at the script and the mails seem to be controlled from the 'thankyou' page so this leads me to think that I could simply alter the 'function SendEmail' section to send the merchant email in HTML format (in the form of an invoice). But I just want to check the solution below.

Would it be possible to tweak the form on the Thankyou page and include the form processor to add the details to a database that can then be used to print invoices. Looks possible but not sure if the two code sets will interact together.

I'm going to try it out this evening and just wondered if you could see any obvious problems I've missed.

I've also heard a lot about your Pro cart version and wondered if this is a feature available within it. It may be worth sugesting this route to the client.

Cheers

Kevinp
Hi Kevin

I have already used the form processor to send emails in HTML format as well as storing info in the database for a customer of mine that wanted a simple solution (but yet with HTML email and DB storage)

So the answer is yes although there is some (small) complications: you need to set the $_SERVER['REQUEST_METHOD'] to POST (otherwise the processor will not send any email) and you also need to create a dynamic template for the admin and the auto email (not the standard email templates that come with the DBTS Form Processor)

You can see this at http://dbtechnosystems.com/wb7/webshop_quote3

It has mixed english/dutch text . Go all the way to the end, and then click on the Submit offer button (as, in this case, it was optional) to receive the HTML email and see how it looks.


My Pro cart is database driven and has many features like Stock control, downloadable products, automatically created catalogues (full or per category), search feature, automatic or manual product page creation, customer registration in the database, shipping methods / calculations, mailer, members area, product thumbs in the cart and catalogues, and more. Of course, HTML email and Database storage of Orders, order details, and customer details, as well as Payment details (received from PayPal) is standard. Many of these features are optional and only available on customers request. However, being a cart that has a very limited market, it is custom made and as such it costs some mone.

You can se eit in action on Steve's site

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Fri Feb 04, 2011 3:09 pm
by kevinp
Hi Naval

I've decided to go with sending the Emails as html. Seems to fit clients needs better (he wants simple unlike his last cart) I've started by trying to define a table with the code below. I'm not a php guru but learning. I'll post (hopefully my solution) when I'm done.

Code: Select all

// create mail message to merchant
$subject = $mail_merchant_subject;
$title = $mail_merchant_title;
$footer = $mail_merchant_footer;
SendEmail($dbts_contactemail, $subject, $title, $orderid, $timestamp, false, $mail_merchant_footer);

function SendEmail($mailto, $subject, $title, $orderid, $timestamp, $maskcardno, $footer)

{
require 'admin/config.php';
require 'admin/paypal_settings.php';
   $header  = "From: ".$GLOBALS['dbts_title']."<".$GLOBALS['paypal_email'].">"."\r\n"; 
   $header .= "Reply-To: $paypal_email"."\r\n"; 
   $header .= "MIME-Version: 1.0"."\r\n"; 
   $header .= "Content-Type: text/plain; charset=ISO-8859-1"."\r\n"; 
   $header .= "Content-Transfer-Encoding: 8bit"."\r\n"; 
   $header .= "X-Mailer: PHP v".phpversion(); 


   //New Code--------------------------------------------------------------------------------

// message
$message = '
<html>
<head>
<title>Invioce</title>
</head>
<body>

<table width="642" border="1" cellpadding="1" 
cellspacing="1" bordercolor="#000000">
<tr>
$message = "<td width="210">$title:</td>
</tr>
$message = "<td width="419">$alpha." $orderid " </td>"
$message = "<td width="419">$order_date_label." $timestamp " </td>"
$message = "<td width="419">$customer_info_label."." </td>"
</tr>
etc, etc, etc.

Steve. Its my wifes site but I do most of the marketing etc. If you just send a message through the contact form http://www.aivahealth.co.uk/contact.php.

Cheers

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Fri Feb 04, 2011 3:34 pm
by Navaldesign
Kevin,

your email header is wrong, as you need to send HTML email (not text/plain)

You can NOT do his in simple HTML, as you need to create a PHP loop, to loop through products and create as many table rows as the products themselves.

If you wish, contact me through my sitecontact form and I will send you the code I used for the html template so you can use it in your own code.

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Fri Feb 04, 2011 4:28 pm
by kevinp
Ahh. I had changed the header but the code I posted was not up to date.

I see what you mean about looping. I will contact you Naval. That would be very helpfull. Thank you.

Cheers

Kevinp

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Wed Feb 09, 2011 9:11 pm
by Navaldesign
Yes, it will show, pls read the documentation, and look at the example product form that is included in the example project.

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Sun Feb 13, 2011 8:02 am
by Hrankov
Hello friends,

because of usual procedures concerning Credit Carts like VISA, the guys want to see the LOG HISTORY.
It means, we need to establisg a MEMBER AREA, where at a special point of ordering, just after the Schopping Cart and the Customer Area the visitors need to Sign In with Username and Password. Something like this very FORUM Membership form with all option we see here - Register, Login, Logout, Change Password, Forgotten Passsword and so on.

The People fron VISA, Master Cart and all others handling with Credit Carts want to see the Login History, who was in contact with us, what he orders etc. because of security guarantees.

My problem: I nave no idea how to do it. There is no extesion for this case. The WebShop 2 is wonderfull, we used it to establich a Fine Arts Web Shop for very special modern artists from Bulgaria. If you visit http://shop.hrankov.eu you can take a look of the start of this project. Thanks to the creators of this extension, we are very happy with WebShop 2 indeed. I can manage it perfectly, but we really need this option too. Any help?

Best regards from Sofia

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Sun Feb 13, 2011 8:48 am
by Navaldesign
I'm sorry, what you want is something that goes beyong the Webshop Plus capabilities. If they need also Order details in the Log History, then you need a full Database driven cart with customer registration section, customer login etc. All this is possible but not with the free Webshop Plus.

You need to either use a ready made cart (OSCommerce, Zen Cart etc) or a custom made like my own Webshop Pro (paid)

Please note that these requirements are rather anusual. CC companies usually only require that IF you hold the cc details on your server, you fullfill the security standard requirements they have adopted, but they certainly do NOT ask to have the order details , or have a customer registration area. Maybe you have misunderstood something ?

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Sun Feb 13, 2011 9:38 am
by Hrankov
It is absolutelly possible, that I have misunderstood something. Most Banks have usulally they own interface for CC payments, we just need to implement it via iFrame in our Web Shop. But anyway I like to see how your WebShop Pro works, and need for all cases your Customized DBTS Logger, but let me first ask it he hold the Log History as a script too? It will be enaugh, I think so. How my I test your WebShop Pro (I do not have any exeriancve wit MySQL, so I preffer the PHP Version) and how may I recieve both products for wich price (via VISA pay service)? You may use my personal email to answer this qustions, if you preffer. - Email address removedPeter Hrankov

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Sun Feb 13, 2011 10:25 am
by Navaldesign
You have mail.

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Mon Mar 07, 2011 7:43 pm
by kevinp
Hi Naval

You kindly showed me how to add Country specific tax to the net cart value using the code below:
This is exactly the same issue as US residents: US sites apply taxes ONLY to residents of the same state where the company is.
Whay you can do:
Set the tax to be 0.

Ad these lines :

if($shiptocountry == $origin_country){
$taxes = $subtotal * 10/ 100;
}

just after


if ($tax_type == "unique") {
$taxes = $subtotal * $unique_tax_percent / 100;
}


where 10 (or whatever else) is the applicable tax percent.
But is it possible for it to be added to the gross value of the cart (including shipping) so that the tax for the specific country would be added to the total cart value.

I've played around with changing the $taxes = $subtotal to $taxes = $total but think I'm missing something as it failed miserably.

Cheers

Kevin

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Mon Mar 07, 2011 9:28 pm
by Navaldesign
Hi Kevin,

Out of town at the moment, I need to have a look to the code and I'll keep you posted. I'll be back tomorrow eveni ng.

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Mon Mar 07, 2011 10:29 pm
by kevinp
Thanks Naval. Much appreciated.

I’m not sure why but it seems common for the tax to be added to the whole cart value (including shipping). This seems to be a big alteration in the cart code from what I can see. Any pointers would be appreciated.

Cheers
Kevin

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Thu Mar 17, 2011 9:00 pm
by kevinp
Hi Naval

My client has reported a strange problem. On adding a product to the cart all is well, the product is added and the tax is added for Australian orders only with local rate shipping. When the user selects a country all this would change with the GST 10% removed and international postage removed but unless they click the recalculation button the tax and postage remain the same but they are allowed to proceed to the customer page.

Is ther e a way to require the customer to click the recalculate button if they change the country before continuing to the customer page? I tried using events to unhide the 'checkout' button until the recalculate is pressed but this simply disabled the recalculate button.

Or can the recalculate routine be added to the country selection as an onchange event.

Cheers

Kevin

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Thu Mar 17, 2011 9:18 pm
by Navaldesign
Yes, the best thing is to use a small Javascript and an "onChange" event to recalculate the tax, shipping etc and populate all fields with the correct values.

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Thu Mar 17, 2011 10:17 pm
by kevinp
Maybe I could call the recalculate function from ajax. I'll see what I can come up with with a visit to Google.

Cheers

kevin

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Fri Mar 18, 2011 6:23 am
by Navaldesign
Hi Kevin,

Using Ajax you can recalculate all the cart values and then repopulate the fields as necessary. But is it really worth it for a "free", basic level cart ?

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Sat Mar 19, 2011 9:51 am
by kevinp
Normally I'd agre, it's not really worth it for the standard cart but the problem is also present on the altered html mail cart and appears to happen with alarming regularity. People do choose their country but then click 'checkout' without using the recalculate button hence the tax and shipping are wrong resulting in somewhat of a mess. For my own site (where I've also made use of the cart) I'm in the process of going back to the mini cart option but unfortunately the client requires the html E-mail/packing slip so I'm kind of stuck with the current configeration.

Cheers

Kevin

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Sat Mar 19, 2011 12:16 pm
by Navaldesign
Hi Kevin,

I'll see if I can implement an Ajax routine to automatically update the cart on country selection or, at least, to force cart refreshing.
I'll keep you posted.

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Sat Mar 19, 2011 3:00 pm
by Navaldesign
Hi Kevin,

You have a mail with the solution.

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Sun May 08, 2011 10:03 am
by Patrik iden
Ohh are you selling that plugin now?

Re: Modified version of the WB Webshop!! Webshop_plus

Posted: Thu Nov 17, 2011 8:19 pm
by kevinp
Hi ponderosaprinting/Naval

Would it be possible to use a Combobox instead of a textbox for the quantity. You could then set the values as you wanted e.g. 5, 6, 7, 8, 9 etc. I'm sure I've used this method before, I'll look through my files and see if I can find it.

Cheers

Kevinp

UPDATE:

Yes it is possible. I found a site where I've used this method. Swap the Quantity text box on your form for a combobox with the same name. I'll try and sort out a demo.