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


Recent Events
  • 05/09/2017 BIG Autumn SALE

    Use AUTUMN17 coupon code to buy our WordPress or Joomla! extensions with 25% discount. Hurry up! The offer is valid till 11 September.

  • 14/04/2017 Happy Easter

    Wish a Happy Easter and give 30% discount for all our WordPress and Joomla! extensions. Use EASTER17 coupon code. The offer is valid till 17 April.


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 1 Year, 8 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 01:55 By finngu.
The administrator has disabled public write access.
 
#56959
Re:Need help - virtuemart price list 1 Year, 8 Months ago Karma: 666
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 1 Year, 8 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 1 Year, 8 Months ago Karma: 666
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 1 Year, 8 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 1 Year, 8 Months ago Karma: 666
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