Hi.
I am asking this also even there is an topic already but any new info about that how we can remove necesarry "required" fields? I am not shipping any products (digital).
And many customer wants to just buy product fast and not give anything else than email address. So is there any solution for fast edit? That vQmod is too hard for me.
In General
Monday, April 29 2019, 09:41 AM
Share this post:
Responses (19)
  • Accepted Answer

    Tuesday, June 18 2019, 07:31 PM - #Permalink
    Hi Daniel,

    What happens if you go to your orders via Dashboard - Sales and Products - View and then update the status in the history?

    Regards,

    Hackasacka
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 18 2019, 04:24 PM - #Permalink
    Better do some fresh testing before claiming it doesn't work. ;)

    Daniel Alfredson wrote:
    Sale went through with no issues.
    But now going to My Account>Downloads, you get the message "You have not made any previous downloadable orders!".


    The order must reach the correct status first, a completed/shipped status, defined in your settings in the 'Checkout' section of Option: https://arastta.org/docs/user-manual/system/settings/option
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 18 2019, 03:44 PM - #Permalink
    Ok so setting shipping to "No" in the past didn't work but seems to be working now.
    It used to fail at one point and you couldn't complete the sale.

    But I just tried a test sale with a downloadable content (file has been added to downloads)
    Completed the sale with a value of $0.00 for the download.
    Sale went through with no issues.

    But now going to My Account>Downloads, you get the message "You have not made any previous downloadable orders!".

    So even though you just purchased a downloadable product it doesn't recognize it.

    Using "second" theme if it matters at all.
    I don't have downloadable content so doesn't bother me if it works, but others might want it.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 18 2019, 02:39 PM - #Permalink
    Daniel Alfredson wrote:
    This doesn't work. It was posted before that it was broken but it was never fixed.


    Do you have any reference? Was it added as a GH Issue? But surely there nothing being fixed, not even the core team bothers to keep their cart working - and especially not the users. :)
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 18 2019, 03:29 AM - #Permalink
    Rune Rasmussen wrote:

    When you add/edit products there is a Yes/No select field for 'Requires Shipping', look at and test that.

    Ref. documnetation: https://arastta.org/docs/user-manual/catalog/products/data
    Requires Shipping: If the product requires shipping, select "Yes". If not, select "No".



    This doesn't work. It was posted before that it was broken but it was never fixed.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, May 07 2019, 02:27 PM - #Permalink
    Hi John,


    If you still require any of the other fields in the "Checkout / Registration" , like "First Name" and "Last Name" then simply do not comment them out as required?

    There is also a registration page as part of the "Accounts / Registration" which you may wish to remove some of the fields from too?

    Although, the files often (confusingly) have the same name they are not the same and all need to be separately modified. Obviously, they couldn't be of the same name and in the same directory, so herei s the location of this one.

    Account Registration template file:-

    /catalog/view/theme/default/template/account/register.tpl

    Account / Registration controller file:-

    /catalog/controller/account/register.php

    When it has the folder "catalog" first then it refers to the "frontend" of Arassta and when it has "admin" it refers to the backend, so if you see something you wish to modify whilst logged in at the "backend" you will find the files with the "admin" somewhere.

    There is far more Information with reference to Opencart shopping cart on the Internet and as Arastta is fairly closely copied from Opencart 2.x you can research problems better by substituting Arastta for Opencart in your search phrase.

    If Arastta is not further developed then this may be a good option and you can easily use the Backup and Export Tools to retrieve your products and data.

    Arastta has a very well designed "backend" with an intuitive layout and extra features built in to the core by comparison to Opencart, but they were essentially the same a few years ago and Opencart is still moving forward.


    Anyway, there are a lot more development ideas and modules for Opencart, but Arastta has a great interface.


    Regards,


    Hackasacka
    The reply is currently minimized Show
  • Accepted Answer

    Monday, May 06 2019, 09:33 PM - #Permalink
    Hi John,


    The customer would need an account so that they can access the downloadable product "after" it is purchased, so as the guest checkout doesn't have this capability the radio button option has been removed from the checkout page in Arastta when a downloadable product is detected in the cart.

    It is understandable that you would like to have unnecessary options (that put off customers) removed from the registration process to allow a simple sale.

    We can remove all the registration fields except email and password. Also, there is no need for a shipping or billing address.

    This method will remove all of the above fields, but if you do wish to have products that are shipped in the future then you will have to replace the original files so back them up (you can always download Arastta again to retrieve them too).

    A better solution would be to create a separate registration and checkout module for when downloadable goods are purchased, but keeping the originals too.

    The first file to modify is the registration template:-

    /catalog/view/theme/default/template/checkout/register.tpl (line 23-42)

    Rather than deleting the form fields we can simply hide them using a CSS style="display: none;" within the HTML element. Then if you need to change it back it is easier to see where you need to edit. Also, it is easier to explain where to modify the files too.

    <div style="display: none;" class="form-group col-sm-6 required">
    <label class="control-label" for="input-register-firstname"><?php echo $entry_firstname; ?></label>
    <input type="text" name="firstname" value="<?php echo $firstname; ?>" placeholder="<?php echo $entry_firstname; ?>" id="input-register-firstname" class="form-control" required autocomplete="given-name" />
    </div>
    <div style="display: none;" class="form-group col-sm-6 required">
    <label class="control-label" for="input-register-lastname"><?php echo $entry_lastname; ?></label>
    <input type="text" name="lastname" value="<?php echo $lastname; ?>" placeholder="<?php echo $entry_lastname; ?>" id="input-register-lastname" class="form-control" required autocomplete="family-name" />
    </div>
    <div class="form-group col-sm-6 required">
    <label class="control-label" for="input-register-email"><?php echo $entry_email; ?></label>
    <input type="text" name="email" value="<?php echo $email; ?>" placeholder="<?php echo $entry_email; ?>" id="input-register-email" class="form-control" required autocomplete="email" />
    </div>
    <div style="display: none;" class="form-group col-sm-6 required">
    <label class="control-label" for="input-register-telephone"><?php echo $entry_telephone; ?></label>
    <input type="text" name="telephone" value="<?php echo $telephone; ?>" placeholder="<?php echo $entry_telephone; ?>" id="input-register-telephone" class="form-control" required autocomplete="tel" />
    </div>
    <div style="display: none;" class="form-group col-sm-6">
    <label class="control-label" for="input-register-fax"><?php echo $entry_fax; ?></label>
    <input type="text" name="fax" value="<?php echo $fax; ?>" placeholder="<?php echo $entry_fax; ?>" id="input-register-fax" class="form-control" />
    </div>


    Then, the registration controller needs to be modified so that it does not check for these required inputs in the form we have hidden.

    The second file to modify is:-

    /catalog/controller/checkout/register.php (line 166-184)

    //            if ((utf8_strlen(trim($this->request->post['firstname'])) < 1) || (utf8_strlen(trim($this->request->post['firstname'])) > 32)) {
    // $json['error']['firstname'] = $this->language->get('error_firstname');
    // }

    // if ((utf8_strlen(trim($this->request->post['lastname'])) < 1) || (utf8_strlen(trim($this->request->post['lastname'])) > 32)) {
    // $json['error']['lastname'] = $this->language->get('error_lastname');
    // }

    if ((utf8_strlen($this->request->post['email']) > 96) || !preg_match('/^[^\@]+@.*.[a-z]{2,15}$/i', $this->request->post['email'])) {
    $json['error']['email'] = $this->language->get('error_email');
    }

    if ($this->model_account_customer->getTotalCustomersByEmail($this->request->post['email'])) {
    $json['error']['warning'] = $this->language->get('error_exists');
    }

    // if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request->post['telephone']) > 32)) {
    // $json['error']['telephone'] = $this->language->get('error_telephone');
    // }


    The code has just been commented out so it would be easier to include again if you ever need it.

    Now the checkout process should reach the next step for the billing address which is not required for digital products or the Paypal payment gateway either.

    This therefor this can be removed

    The third file to modify is the address template:-

    /catalog/view/theme/default/template/checkout/address.tpl (line 7)


    <div style="display: none;" class="<?php echo $class; ?>">


    Then, the address controller needs to be modified so that it does not check for these required inputs in the form we have hidden.

    The fourth file to modify is:-

    /catalog/controller/checkout/address.php(line 322-352)

    //        if ((utf8_strlen(trim($this->request->post[$prefix.'_firstname'])) < 1) || (utf8_strlen(trim($this->request->post[$prefix.'_firstname'])) > 32)) {
    // $json['error'][$prefix.'_firstname'] = $this->language->get('error_firstname');
    // }

    // if ((utf8_strlen(trim($this->request->post[$prefix.'_lastname'])) < 1) || (utf8_strlen(trim($this->request->post[$prefix.'_lastname'])) > 32)) {
    // $json['error'][$prefix.'_lastname'] = $this->language->get('error_lastname');
    // }

    // if ((utf8_strlen(trim($this->request->post[$prefix.'_address_1'])) < 3) || (utf8_strlen(trim($this->request->post[$prefix.'_address_1'])) > 128)) {
    // $json['error'][$prefix.'_address_1'] = $this->language->get('error_address_1');
    // }

    // if ((utf8_strlen(trim($this->request->post[$prefix.'_city'])) < 2) || (utf8_strlen(trim($this->request->post[$prefix.'_city'])) > 128)) {
    // $json['error'][$prefix.'_city'] = $this->language->get('error_city');
    // }

    // $this->load->model('localisation/country');

    // $country_info = $this->model_localisation_country->getCountry($this->request->post[$prefix.'_country_id']);

    // if ($country_info && $country_info['postcode_required'] && (utf8_strlen(trim($this->request->post[$prefix.'_postcode'])) < 2 || utf8_strlen(trim($this->request->post[$prefix.'_postcode'])) > 10)) {
    // $json['error'][$prefix.'_postcode'] = $this->language->get('error_postcode');
    // }

    // if ($this->request->post[$prefix.'_country_id'] == '') {
    // $json['error'][$prefix.'_country'] = $this->language->get('error_country');
    // }

    // if (!isset($this->request->post[$prefix.'_zone_id']) || $this->request->post[$prefix.'_zone_id'] == '') {
    // $json['error'][$prefix.'_zone'] = $this->language->get('error_zone');
    // }


    There may be more modifications needed to refine the registration and checkout procedure. For instance it would be possible to only add the CSS style to "display: none;" when a downloadable product is in the cart using a little more logic and possibly some Javascript to update the page.

    However, this should allow you to more easily get it working and understand what you have to edit too.


    Hope this helps.


    Regards,


    Hackasacka
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, May 01 2019, 10:49 PM - #Permalink
    Hi Rune,


    With regards to the "Paypal Express" module.

    It has been installed after downloading the module from the "Marketplace". It does now appear as a payment module too. However, the Admin -> Appearance->Layout does not show the module in the left-hand-side list.

    File admin/view/template/appearance/layout_module_list.tpl appears to generate the list and the MySQL table xxx_module does not have a record for Paypal_Express.

    Also, there is not a file uploaded to directory:-

    /admin/view/template/module

    Thought it should have an file here like "paypal_express.tpl", but copying one of the existing modules to a file of that name has not solved the problem.

    Can you suggest any remedies for this problem?


    Regards,


    Hackasacka
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, May 01 2019, 05:19 PM - #Permalink
    Hi John,


    The Paypal Express payment gateway is still being tested, but in the interim here is some code to try just so you can quickly ascertain if this is the sort of solution you are looking for?

    If you are using the default template the file you need to modify is:-

    /catalog/view/theme/default/template/product/product.tpl

    It is possible to access this using Tools - File Manager. Make sure you make a backup of any files that you modify so that you can easily replace them with the original if necessary at a later date.

    This is much simpler code that now does not include shipping costs for you to try:-

    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <!-- Identify your business so that you can collect the payments. -->
    <input type="hidden" name="business" value="[email protected]">

    <!-- Specify a PayPal Shopping Cart Add to Cart button. -->
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="add" value="1">

    <!-- Specify details about the item that buyers will purchase. -->
    <?php if (!$special) {
    $paypal_price = substr($price, 2);
    $paypal_price = str_replace(',', '', $paypal_price);
    } else {
    $paypal_price = substr($special, 2);
    $paypal_price = str_replace(',', '', $paypal_price);
    } ?>
    <input type="hidden" name="item_name" value="<?php echo $heading_title; ?>">
    <input type="hidden" name="amount" value="<?php echo $paypal_price; ?>">
    <input type="hidden" name="currency_code" value="GBP">
    <!-- Display the payment button. -->
    <input style="margin: 0 auto;" type="image" name="submit"
    src="https://www.your-domain.com/image/catalog/paypal-logo-pay-with-paypal-tmi.png"
    alt="Pay with Paypal" title="Pay with Paypal" class="img-responsive">
    <img alt="" width="1" height="1"
    src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">
    </form>


    You will need to change this to your Paypal account email address:-

    value="[email protected]"

    Also, change the image being used for the button or use a standard Paypal image instead:-

    src="https://www.your-domain.com/image/catalog/paypal-logo-pay-with-paypal.png"

    Finally, check the currency you need and modify as necessary:-

    value="GBP"

    Paypal provides a reference of possible currencies on their website or you could call them as they are very helpful.

    The File Manager in Arastta does not show line numbers, but you would need to make a new line below line 334:-

    Here is line 333-334 (you may be able to search for it although it is not entirely unique) :-

                            <?php } ?>
    </div>


    The amended file is going to be attached to this post, so you could replace the file or the entire contents with this if that is simpler. It is for version 1.6.2 and is the Default template "product.tpl".

    Obviously, this temporary solution requires you to manually then link your customer to the downloadable product once you are satisfied you have payment, so is far from elegant, but it does work and is relatively simple to implement as a trial until we find a better solution.


    With regards to Paypal Express you would need to obtain from your Paypal Account:-

    API Username

    API Password

    API Signature

    It may be useful for you to have a look at some references (online videos) to see if it is of interest first.

    As you have no need to ship your product and instead it can be downloaded it may be possible to remove unwanted fields address fields and possibly name and phone number too, but for international sales a location may be required for tax purposes payable to the country you are selling to? Not sure of the official legalities regarding sales of this type.

    https://www.avalara.com/us/en/learn/whitepapers/out-out-darn-spotify.html


    Let us know whether this is useful or not?


    Regards,


    Hackasacka
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 30 2019, 08:34 PM - #Permalink
    Hi Rune,


    Arastta would be used (or another equivalent cart) as you benefit from the many built in features, it's open source origins and theoretically support and future development.

    Sometimes lots of features are not required like using "Word" or "LibreOffice" when a text editor or "Notepad" would accomplish the same thing. Rarely, is one product good for all requirements. In some cases a simpler website may be an advantage, like you suggest. It would be difficult to know without having more information about any given project.

    Anyway, you are missing the point as you could still use that simple HTML and PHP code snippet to quickly add a payment option (button) with very little effort compared to developing a full payment gateway that integrates with the backend of Arastta and Paypal. Arastta is full of simple HTML as are many websites. There is a purpose to the code snippet and it would be useless in a stand alone situation. If one already exists then it is a different story, Yes, of course it doesn't cover all bases, like digital downloads and isn't particularly commercially viable, but could be modified. Like you correctly point out it is far from comprehensive, but the solution does not remove the other options in Arastta and is just another feature. It could also be of little use at all, but it may also help someone else other than you too (like John the intended recipient). Perhaps you could of suggested a guest checkout with Paypal Express earlier in the thread to John as that is probably the best solution (if it works?). Does it?

    The point of Arastta is that it makes a great catalogue of products or services and can take electronic payments if required too. It is also free and can be setup very quickly (as you most likely already know).

    Many of your responses do not resolve the problem, just ask more questions, although you obviously have a good understanding of Arastta and the technology it embraces and appear to wish to guide people in the right direction (as long as it's yours).

    See if you can provide a solution for someone in two lines of text? A little tricky if their information about the problem is vague, but at least with a more detailed response there is a chance the forum user could resolve the problem without needing someone like yourself to develop it for them.

    In the future would it be possible to collaborate in helping people as opposed to verbally dismissing the style or opinion of others on the forum please.

    Your advise has been duly noted for future posts as you are probably partially right.


    Kind regards,


    Hackasacka
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 30 2019, 02:55 PM - #Permalink
    But why use Arastta then, just do display a simple html? Better teach the user to set up a simple html page then. But none of those "solutions" would give the customer automatically access to the digital product (download), which is kind of the point to use Arastta or similar to handle this. ;)
    It makes no sense at all, it becomes just confusing for everyone, like many of your "replies" - which also makes it of topic btw.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 30 2019, 02:36 PM - #Permalink
    Hi Rune,


    The point is you still make a sale and it is very easy to pay? It is merely a quick modification that is simple to implement as an alternative to the other payment gateways.

    The posts are longer because they hopefully provide all of the instructions to implement a solution which would be difficult otherwise. Haven't we already covered this before?

    Paypal Express in the "Marketplace" may or may not work? Have you tried it yet Rune?

    https://extensions.arastta.pro/payment-gateways/paypal-express-checkout-button

    It is probably a better solution to use if it can be easily installed without modification. It would be beneficial to keep the transaction records in Arastta.


    Thanks for the information.



    Regards,


    Hackasacka
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 30 2019, 09:19 AM - #Permalink
    Hackasacka, what is the point of using Arastta at all then? You really do write a lot of long weird things, and I don't get why.

    If you want to use PayPal's quick checkout, use PayPal Express. Which would be storing the order data in Arastta, AND giving the customer access to the digital product he/she bought access to.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 29 2019, 09:46 PM - #Permalink
    Hi John,

    With regards to taking a payment without needing as many details.

    It is possible to take no information within Arastta, but instead simply have a one to two step direct Paypal payment. The order would be saved in your Paypal account instead.

    In the view part of the MVC for the product page:-

    public_html/catalog/view/theme/second/template/product/product.tpl

    or

    public_html/catalog/view/theme/second/default/product/product.tpl

    You could add a Paypal button anywhere in this page:-

     <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <!-- Identify your business so that you can collect the payments. -->
    <input type="hidden" name="business" value="[email protected]">

    <!-- Specify a PayPal Shopping Cart Add to Cart button. -->
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="add" value="1">

    <!-- Specify details about the item that buyers will purchase. -->
    <?php if (!$special) {
    $paypal_price = substr($price, 2);
    $paypal_price = str_replace(',', '', $paypal_price);
    if ($paypal_price <= 30) {
    $postage = 3.95;
    $paypal_shipping = 'Royal Mail £' . $postage;
    }
    elseif ($paypal_price <= 150) {
    $postage = 9.99;
    $paypal_shipping = 'Courier £' . $postage;
    } else {
    $postage = 0;
    $paypal_shipping = 'free';
    }
    $paypal_price = $paypal_price + $postage;
    } else {
    $paypal_price = substr($special, 2);
    $paypal_price = str_replace(',', '', $paypal_price);
    if ($paypal_price <= 30) {
    $postage = 3.95;
    $paypal_shipping = 'Royal Mail £' . $postage;
    }
    elseif ($t <= 150) {
    $postage = 9.99;
    $paypal_shipping = 'Courier £' . $postage;
    } else {
    $postage = 0;
    $paypal_shipping = ' Courier free';
    }
    $paypal_price = $paypal_price + $postage;
    } ?>
    <input type="hidden" name="item_name" value="<?php echo $heading_title . ' - shipping ' . $postage . ' GBP'; ?>">
    <input type="hidden" name="amount" value="<?php echo $paypal_price; ?>">
    <input type="hidden" name="currency_code" value="GBP">
    <!-- Display the payment button. -->
    <input style="margin: 0 auto;" type="image" name="submit"
    src="https://www.your-website.com/image/catalog/paypal-logo-pay-with-paypal.png"
    alt="Pay with Paypal" title="Pay with Paypal" class="img-responsive">
    <img alt="" width="1" height="1"
    src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">
    </form>


    Please ensure you alter your Paypal account email address to your own and check the curreny for your country currently GBP.

    This also adds a value for shipping based on the cost and is in a currency for the United Kingdom.

    If you add it above this existing code near line 340 for the "Second" template:-

    <?php if ($review_status) { ?>


    following the closing div

    </div>


    It makes it very easy to take a payment with Paypal, but lacks storing customer information.


    Hope it helps.


    Regards,


    Hackasacka
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 29 2019, 11:47 AM - #Permalink
    Oookay:( Well is there any updates for that contact form to get it to work?
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 29 2019, 11:39 AM - #Permalink
    John Malcom wrote:

    Tested that already..still asking address when buying as "guest". Also those needs to be remove also when registering. I only need Email, name & lastname.


    Right, it only removes the shipping step / address in checkout. So you would have to modify the system then, or get someone else to do it for you. There are no settings for this in the system today, and it probably newer will be.

    Beyond that: https://arastta.org/forum/forum-rules
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 29 2019, 11:35 AM - #Permalink
    ...
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 29 2019, 11:09 AM - #Permalink
    Tested that already..still asking address when buying as "guest". Also those needs to be remove also when registering. I only need Email, name & lastname.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 29 2019, 10:51 AM - #Permalink
    When you add/edit products there is a Yes/No select field for 'Requires Shipping', look at and test that.

    Ref. documnetation: https://arastta.org/docs/user-manual/catalog/products/data
    Requires Shipping: If the product requires shipping, select "Yes". If not, select "No".
    The reply is currently minimized Show
Your Reply