News:

AbanteCart v1.4.4 is released.

Main Menu
support

Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - rigrax

#1
After correcting the amysqli.php error remains, but the order IS going through (I am receiving the confirmation emails in admin and to user).
This happens when placing the code on the tpl page, and as noted, this isn't where it should go.....

But I think it's redundant to add this sql to the order.php model, since code is already there to return some of the data I want.

It seems logical to me that I should be able to insert a hook on the success.tpl page to bring the data there.
If this is correct, what should the syntax for that be?

Thanks for the aid!
#2
Thanks; I see what you  meant now....  I'll try this when I get back to the office.
#3
I wrote earlier: based on syntax found in storefront/model/checkout/order.php    (line 152), assuming Abantecart's own code would be the right format....
Is the rest of the code I wrote correct?
What are the steps I must take, after getting the data I want, to insert the data into a DIFFERENT database on the same server?
Thanks for the feedback abolado
#4
Customization help / Re: Change a button's link
March 14, 2019, 05:04:05 PM
I did this in cart.tpl by hard-coding the link instead of     <?php echo $continue; ?>     at line 177.
#5
Customization help / Change a button's link
March 14, 2019, 03:58:06 PM
I'd like to change the link in the "Continue Shopping" button at the bottom right of the page  on  rt=checkout/cart    to send users back to the storefront home page rather than the last product viewed.   How/where can I accomplish this?
Thanks!
#6
I will be happy to add my code in the storefront model      orders.php
So my original question is now altered:  What are the steps I must take, after getting the data I want, to insert the data into a DIFFERENT database on the same server?

Where can I securely add the required login credentials/db connection code for the receiving db?
Thanks!
#7
Yes, I know; but this is just testing. Do you have any tip for me?
Thanks.
#8
Customization help / Getting MySql Error (v1.2.13)
March 13, 2019, 10:57:03 AM
WHAT I'M SEEING:

There has been a critical error processing your request
SQL Error:   Error No: 0
SQL: in /home/xxxxx/public_html/xxxx/xxxx/core/database/amysqli.php on line 114
(I have removed folder names for secuity's sake)

MY PURPOSE:
I'm testing the ability to add a simple db query on the   storefront/view/default/template/common/success.tpl    page and to return two lines of results to the page for the user.   This is in preparation for adding code for other backend actions.

WHAT I DID:
I inserted the query in the success.tpl file, based on syntax found in storefront/model/checkout/order.php    (line 152).

QUERY I ADDED IS IN RED:
[LINE 8]   <section class="mb40">
<h4 class="hidden">&nbsp;</h4>
   <p><?php echo $text_message; ?></p>
   <?php $query = $this->db->query("SELECT MAX(order_id) AS order_id FROM `".$this->db->table("orders")."`");
            $result = $this->db->query($sql);
            $row = $result->row;
            echo $row['order_id'];
            echo $row['firstname'];
        ?>

   <a href="<?php echo $continue; ?>" class="btn btn-default mr10" title="<?php echo $continue_button->text ?>">
       <i class="fa fa-arrow-right"></i>
       <?php echo $continue_button->text ?>
   </a>
</section>

What am I missing? The error shown isn't explicit enough to hint at the problem.
Thank you in advance for help.
RIGRAX

Forum Rules Code of conduct
AbanteCart.com 2010 -