Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Need help - virtuemart price list
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Need help - virtuemart price list
#56958
Need help - virtuemart price list 8 Years, 9 Months ago Karma: 0
I need to make a simple pricelist pulling some data from the database and place in an article with the module.
I need to show the following from the products

product_sku
product_category
product_product_name
product_shortdescription
product_price
product_height


I simply can't figure out how to do this?
I believe I have to enter something in SQL query in the module, but what exactly?

I hope somebody can help me


Thanks
Finn
Last Edit: 2016/02/17 08:55 By finngu.
The administrator has disabled public write access.
 
#56959
Re:Need help - virtuemart price list 8 Years, 9 Months ago Karma: 760
Hello,

Populate "Choose source type -> SQL -> SQL query" parameter with the following value:

SELECT
product_sku,
product_price,
product_height
FROM
#__virtuemart_products

Regards,
ARI Soft
The administrator has disabled public write access.
 
#56961
Re:Need help - virtuemart price list 8 Years, 9 Months ago Karma: 0
OK thank you very much. You've got me started and I tried and came up with this:

SELECT
virtuemart_product_id,
product_name,
product_s_desc,
FROM
#__virtuemart_products_da_dk

So far so good. That lists the products with ID, Name and short desctiption - But without all the information that I need - which are actually spread across 3 tables and not only in virtuemart_products_da_dk


Price is in the field product_price in the table virtuemart_product_prices
and
Height is in the field product_height in the table virtuemart_products
(not in virtuemart_products_da_dk)

So how can I combine showing ALLE fields from ALL TREE tables on a single line for each product?


Thanks again


Finn
The administrator has disabled public write access.
 
#56965
Re:Need help - virtuemart price list 8 Years, 9 Months ago Karma: 760
Try the following:

Code:


SELECT
  P.product_sku,
  P.product_price,
  P.product_height,
  PL.product_name,
  PL.product_s_desc,
  PR.product_price
FROM
  #__virtuemart_products P INNER JOIN #__virtuemart_products_da_dk PL
    ON P.virtuemart_product_id = PL.virtuemart_product_id
  INNER JOIN #__virtuemart_product_prices PR
    ON P.virtuemart_product_id = PR.virtuemart_product_id



Regards,
ARI Soft
The administrator has disabled public write access.
 
#56968
Re:Need help - virtuemart price list 8 Years, 9 Months ago Karma: 0
That gives me this error when loading the article online:

1054 Unknown column 'P.product_price' in 'field list' SQL=SELECT P.product_sku, P.product_price, P.product_height, PL.product_name, PL.product_s_desc, PR.product_price FROM y5eau_virtuemart_products P INNER JOIN y5eau_virtuemart_products_da_dk PL ON P.virtuemart_product_id = PL.virtuemart_product_id INNER JOIN y5eau_virtuemart_product_prices PR ON P.virtuemart_product_id = PR.virtuemart_product_id LIMIT 0,1


Thank you for you help
I am grateful that you take the time to help me - I trust we will find out to make it work with you kind assistance


Finn
The administrator has disabled public write access.
 
#56969
Re:Need help - virtuemart price list 8 Years, 9 Months ago Karma: 760
Sorry, forget to remove a field from the query. Use the following one:

Code:


SELECT
  P.product_sku,
  P.product_height,
  PL.product_name,
  PL.product_s_desc,
  PR.product_price
FROM
  #__virtuemart_products P INNER JOIN #__virtuemart_products_da_dk PL
    ON P.virtuemart_product_id = PL.virtuemart_product_id
  INNER JOIN #__virtuemart_product_prices PR
    ON P.virtuemart_product_id = PR.virtuemart_product_id



Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 12